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.2K Product Ideas
- 1.2K Ideas Exchange
- 1.4K Connect
- 1.1K Connectors
- 273 Workbench
- 2 Cloud Amplifier
- 3 Federated
- 2.7K Transform
- 78 SQL DataFlows
- 526 Datasets
- 2.1K Magic ETL
- 3K Visualize
- 2.2K Charting
- 441 Beast Mode
- 23 Variables
- 514 Automate
- 115 Apps
- 391 APIs & Domo Developer
- 8 Workflows
- 26 Predict
- 10 Jupyter Workspaces
- 16 R & Python Tiles
- 332 Distribute
- 77 Domo Everywhere
- 255 Scheduled Reports
- 67 Manage
- 67 Governance & Security
- 1 Product Release Questions
- Community Forums
- 41 Getting Started
- 27 Community Member Introductions
- 68 Community Announcements
- 4.8K Archive