Case Statement Using Beast Mode Calculations
I need to create a card with one out of two solutions:
- one chart that allows me to stack other beast mode calucations on top of one another, resembling a table; or
- two very elaborate CASE statements that group together a dimension and measure of 17 categories.
The former does not seem to exist, so it seems I'll have to go with solution #2. The trick is that I'm using formulas to set the criteria, not just one string or numeric value.
I then added "IS NOT NULL" after each formula in the WHEN clause since I want the value calculated in the another Beast Mode measure* to present itself in the specific group. Here is a snippet of what I created:
(CASE WHEN (COUNT(DISTINCT (CASE WHEN `Stage`='chargeback' THEN `Case Number` END))) IS NOT NULL THEN 'Disputes Received'
WHEN (COUNT(DISTINCT (CASE WHEN Stage='chargeback' AND `Lifecycle Status`='accept_liability' THEN `Case Number` END))) IS NOT NULL THEN 'Accepted'
WHEN (COUNT(DISTINCT (CASE WHEN `Stage`='chargeback' AND `Lifecycle Status`='document_sent' THEN `Case Number` END)) + COUNT(DISTINCT (CASE WHEN `Stage`='chargeback' AND `Lifecycle Status`='ready_to_send' THEN `Case Number` END))) IS NOT NULL THEN 'Worked'
WHEN (COUNT(DISTINCT (CASE WHEN `Stage`='chargeback' AND `Lifecycle Status`='document_sent' AND `Disposition`='pending' THEN `Case Number` END)) + COUNT(DISTINCT (CASE WHEN `Stage`='chargeback' AND `Lifecycle Status`='ready_to_send' AND `Disposition`='pending' THEN `Case Number` END))) IS NOT NULL THEN 'Pending'...END)
In short, the good news is that I see the 'Disputes Received' value when I assemble the dimension and the measure on a table. And the math is correct.
The bad news is that the dimension 'Disputes Received' and its value are the only the things that present itself on the table. I tried shortening the CASE statements and modifying it but nothing seems to present all 17 categories. Any tips on how to resolve this will be greatly appreciated.
*The other Beast Mode measure has the same CASE statement criteria. But instead of presenting a string such as 'Disputes Received', a formula follows the THEN clause in order to present a numeric value. For example:
(CASE WHEN (COUNT(DISTINCT (CASE WHEN `Stage`='chargeback' THEN `Case Number` END))) IS NOT NULL THEN (COUNT(DISTINCT (CASE WHEN `Stage`='chargeback' THEN `Case Number` END)))...END).
Categories
- All Categories
- 1.4K Product Ideas
- 1.4K Ideas Exchange
- 1.4K Connect
- 1.2K Connectors
- 284 Workbench
- 4 Cloud Amplifier
- 4 Federated
- 2.9K Transform
- 88 SQL DataFlows
- 554 Datasets
- 2.2K Magic ETL
- 3.3K Visualize
- 2.3K Charting
- 562 Beast Mode
- 9 App Studio
- 27 Variables
- 577 Automate
- 140 Apps
- 414 APIs & Domo Developer
- 22 Workflows
- 1 DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 350 Distribute
- 90 Domo Everywhere
- 258 Scheduled Reports
- 2 Software Integrations
- 91 Manage
- 88 Governance & Security
- 9 Product Release Questions
- Community Forums
- 42 Getting Started
- 28 Community Member Introductions
- 85 Community Announcements
- 4.8K Archive