How can I make a window function (or fixed function) ignore interactive filters?
I have a window function that takes the total count for a given error code and divides that by the total number of samples run. If a sample is run and does not generate an error, i.e. it completes successfully, then there is no error code.
In order to calculate the Error rate (we use Errors per Million Samples), I need to count the errors, divide by the total samples run and then multiply by 100. I can do this easily enough with this beastmode:
(sum(case when `Status`='Exception' then `TotalSamples` else 0 end) / sum(sum(`TotalSamples`)) over () ) * 1000000
However, if I put this calculation on a card and then interact with another card on the dashboard using interactive filters to select a certain error code, then that interactive filter will over-rule the window function so that the calculation no longer sees those samples that did not have a specific error code.
Is there a way to write a window function or fixed function so that it will calculate correctly even when an interactive filter is used?
Best Answer
-
Have you tried using FILTER NONE as part of the FIXED function to prevent all filtering on your window function?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Answers
-
https://domohelp.domo.com/hc/en-us/articles/4408174643607-Beast-Mode-FIXED-Functions#2.0.2. i believe REMOVE should help.
Jae Wilson
Check out my π₯ Domo Training YouTube Channel π¨βπ»
**Say "Thanks" by clicking the β€οΈ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Hi @jaeW_at_Onyx -
I looked at REMOVE. The problem here is that when you utilize the interactive filter, it appears to override the REMOVE. The interactive filter actually prevents data from being available to the card altogether so even by removing a field from the FIXED calculation, if the card never "sees" the data that is getting filtered by the interactive filter, then the calculation won't include that data
0 -
Have you tried using FILTER NONE as part of the FIXED function to prevent all filtering on your window function?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
@GrantSmith - Thank you! FIXED (FILTER NONE) is exactly what I was looking for. I do think it is odd that FIXED (REMOVE `specific field`) didn't work but FILTER NONE did. Either way, thanks for the suggestion, this is working for me now
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 621 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 743 Beast Mode
- 58 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive