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.6K Connect
- 1.2K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 633 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 760 Beast Mode
- 62 App Studio
- 42 Variables
- 699 Automate
- 181 Apps
- 457 APIs & Domo Developer
- 51 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive