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

  • GrantSmith
    GrantSmith Coach
    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!**

Answers

  • 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"
  • ST_Superman
    ST_Superman Domo Employee

    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

  • GrantSmith
    GrantSmith Coach
    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!**
  • ST_Superman
    ST_Superman Domo Employee

    @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