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.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
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 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