Apply a % Model based on an identifying field

Hi All
I've got a challenge when trying to apply a sum(max()) value to my card as there is a variable I can't identify correctly
In my data (anonymized) I have the following columns I need to use for this:
[Customer], [Model Type], [Model %], [Master Description], [Sub Description]
What I need to do is, when a [Customer] is selected then look at the [Model Type] (Standard or Priority) and apply the SUM(MAX()) [Model %] but when no [Customer] is selected then apply the SUM(MAX()) [Model %] of Standard [Model Type] to all of my data
In my Card (Table) What I would expect to see is when a customer is selected from the Filter the calculation would show the correct % of the summed [Model %] for said customer but if no customer is selected, then it would show the Standard [Model %] as a default
TLDR: When a Customer is selected, apply the MAX aggregation of the [Model %] based on [Model Type] else use [Model Type] = Standard
Apologies if this is badly worded as I'm struggling to find the right way to ask the question on Google to get toward the answer I need but I can elaborate if needed
Thanks for any and all support/responses
Dan
Best Answer
-
Hi @_DanielB_,
I would define a variable with two options: "Selected Customer" and "All Customers." When "Selected Customer" is chosen, the filter card will enable customer-specific filtering. If "All Customers" is selected, filter options will be removed. Calculations and filters will be adjusted accordingly based on the selected option.
Here is an example dataset:
The variable:
The table:
Calculation:
CASE
WHENDOMO Forum Answers Var
= 'Selected Customer' THEN SUM(Model %
)
WHENDOMO Forum Answers Var
= 'All Customers' THEN CASE WHENModel Type
= 'Standard' THEN SUM(Model %
) END
ENDFilter:
CASE
WHENDOMO Forum Answers Var
= 'Selected Customer' THEN 'TRUE'
WHENDOMO Forum Answers Var
= 'All Customers' THEN CASE WHENModel Type
= 'Standard' THEN 'TRUE' END
ENDThe result will be displayed on the dashboard. When "Selected Customer" is selected, the filter will show all customers, allowing the user to choose one.
And the result is calculated for each Model Type:
When "All Customers" is selected, the customer filter remains empty, and the results are calculated only for Standard Model Types.
I hope this meets your requirements. If you need any modifications or have any questions, feel free to ask. I'm happy to assist further.
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
1
Answers
-
Hi @_DanielB_,
I would define a variable with two options: "Selected Customer" and "All Customers." When "Selected Customer" is chosen, the filter card will enable customer-specific filtering. If "All Customers" is selected, filter options will be removed. Calculations and filters will be adjusted accordingly based on the selected option.
Here is an example dataset:
The variable:
The table:
Calculation:
CASE
WHENDOMO Forum Answers Var
= 'Selected Customer' THEN SUM(Model %
)
WHENDOMO Forum Answers Var
= 'All Customers' THEN CASE WHENModel Type
= 'Standard' THEN SUM(Model %
) END
ENDFilter:
CASE
WHENDOMO Forum Answers Var
= 'Selected Customer' THEN 'TRUE'
WHENDOMO Forum Answers Var
= 'All Customers' THEN CASE WHENModel Type
= 'Standard' THEN 'TRUE' END
ENDThe result will be displayed on the dashboard. When "Selected Customer" is selected, the filter will show all customers, allowing the user to choose one.
And the result is calculated for each Model Type:
When "All Customers" is selected, the customer filter remains empty, and the results are calculated only for Standard Model Types.
I hope this meets your requirements. If you need any modifications or have any questions, feel free to ask. I'm happy to assist further.
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
1 -
This might be the most in depth and detailed response I've ever received to a challenge before! Thank you so much.. When I am back on this project, I will be implementing this solution!
1
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 306 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 112 SQL DataFlows
- 649 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 787 Beast Mode
- 78 App Studio
- 43 Variables
- 742 Automate
- 187 Apps
- 474 APIs & Domo Developer
- 67 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 406 Distribute
- 117 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 139 Manage
- 136 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive