Ignore some filters (not all) in Beast Mode aggregation
Hello, I have been searching around for a similar posting, but have not been able to find one describing the same question/issue.
I would like to calculate a SUM of a column while ignoring select filters applied to the dataset. The column needs to be affected by all filters except for a couple columns that contain multiple values I want to filter on. Specifically, if I filter on a column called "Reason" that has many distinct values I want to still be able to know the "unfiltered" total aggregation of another column.
For example if this is my dataset of manufactured parts that are checked and potentially rejected:
Date | Reason | Rejected Quantity | Checked Quantity |
1/1/2021 | Dimensional | 5 | 10 |
1/1/2021 | 0 | 10 | |
1/1/2021 | Aesthetic | 10 | 10 |
1/2/2021 | Dimensional | 7 | 10 |
1/2/2021 | 0 | 10 |
I would like the unfiltered calculation to result in (no surprises here):
Date | Rejected SUM | Checked SUM | Rejected Rate |
1/1/2021 | 15 | 30 | 50% |
1/2/2021 | 7 | 20 | 35% |
And if filtering the dataset to include only the "aesthetic" reason, the "checked sum" should remain unfiltered, resulting in:
Date | Rejected SUM | Checked SUM | Rejected Rate |
1/1/2021 | 10 | 30 | 33% |
1/2/2021 | 0 | 20 | 0% |
This is something I will want to do frequently, so creating one-off dataflows is not ideal. I am new to Domo, but this was fairly simple to implement in Power BI using the "ALLEXCEPT" function in a calculation statement. Please let me know if more information is needed to help explain/clarify!
Comments
-
You can do this very easily at the card level and not need to do anything at the dataflow level, which will give your user the most flexibility. For example, create a table and drag in the date, rejected quantity, and checked quantity into your column list and change the aggregation to sum for both of the quantity columns. Drag the reason into the filters section and turn on quick filters. The user can then check and uncheck which reasons they want to see totals for and it will sum them by date.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
Mark, thank you for the reply, however this does not address the issue I have. When creating simple sums for each column there is no issue as you say, however I want one of the columns to ignore a specific filter. In what you describe all columns would be filtered, and I do not end up with the example table that I describe I would like, instead I would get:
Date Rejected SUM Checked SUM Rejected Rate 1/1/2021 10 10 100% Which is easy to follow why it gets filtered in this way, but is not the desired result. Please let me know if further explanation of what I am asking is needed!
0 -
Ah, sorry, I didn't catch that nuance in your example. I'm not sure how dynamic you need it, but you could create a beast mode that sums the rejected quantity based on which reasons you want to look at. It would look like this:
CASE WHEN 'Reason' IN (<your list>) THEN 'Rejected Quantity' ELSE 0 END
You would then drag this field into your card instead of the original rejected quantity column and use the sum aggregate as before.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
The intent is to have it much more dynamic than listing it out manually in the calculation, however your idea inspired me a bit. Would I be able to reference a list disconnected from the dataset? Then I could use the disconnected list as my "filter", which wouldnt filter down the dataset (allowing me to get my desired totals), but in a calculation I could include it only if 'Reason' was a part of that separate list.
In looking around elsewhere, it sounds like you cant have multiple data sources in a card, but perhaps there is another way to get the intended result?
0 -
You can combine multiple datasets in a dataflow (Magic ETL) which would create a single output dataset that you would use for the card. You could certainly have a dataset that has the list of reasons you want to include and then do a left join to your main dataset to develop your include/exclude list and create your totals in the ETL.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
@pl_Luke Domo are working on a beta feature that will give you this idea of a 'baseline group' that is unaffected by a specific (set of) filters. In your case the Reason Code.
this feature is in beta and I'm completely unsure when it's going to release for GA or how stable the implementation is, but definitely check in with your CSM about it.
cc @GrantSmith
What you can do in the immeidate term is APPEND a copy of your data where the ReasonCode is set to "BaseLine" that way you can create a BaselineMetrice (CASE WHEN reason code = 'baseline' ... ) and then all your other metrics are CASE WHEN reasonCode <> 'Baseline' AND ... )
then from the user experience perspective they always include Baseline, and they can select or deselect other reason codes.
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 -
@jaeW_at_Onyx found this post today, do you know if the feature you mentioned got released to production?
0 -
@swagner take a look at FIXED Functions
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
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 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