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.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive