Trying to get different values into the pivot table

Below is the code I am using in Beast mode. I want the "Not" metrics to be divided by MM to give me a value, and the MLR to be divided and the rest of the metrics to be total values.
The pivot table is giving me total values.
SUM(CASE
WHEN MOS_Year
= 2023 THEN
CASE
WHEN Metric
= 'Member Month' THEN MM
WHEN Metric
= 'MLR' THEN COST_MLR
/ REV_MLR
WHEN Metric
= 'Shared Savings Dollars' THEN PAID
ELSE
CASE WHEN Metric
NOT IN ('MLR', 'Shared Savings Dollars') THEN PAID
/ MM
END
END
END)
Best Answer
-
You may want to try this update, if it doesn't work it might be helpful to share a screenshot of your pivot table so that we can see how it's configured:
- CASE
- WHEN MOS_Year = 2023 AND Metric = 'Member Month' THEN SUM(MM)
- WHEN MOS_Year = 2023 AND Metric = 'MLR' THEN SUM(COST_MLR) / SUM(REV_MLR)
- WHEN MOS_Year = 2023 AND Metric = 'Shared Savings Dollars' THEN SUM(PAID)
- WHEN Metric NOT IN ('MLR', 'Shared Savings Dollars') THEN SUM(PAID)/ SUM(MM)
- END
1 - CASE
Answers
-
You may want to try this update, if it doesn't work it might be helpful to share a screenshot of your pivot table so that we can see how it's configured:
- CASE
- WHEN MOS_Year = 2023 AND Metric = 'Member Month' THEN SUM(MM)
- WHEN MOS_Year = 2023 AND Metric = 'MLR' THEN SUM(COST_MLR) / SUM(REV_MLR)
- WHEN MOS_Year = 2023 AND Metric = 'Shared Savings Dollars' THEN SUM(PAID)
- WHEN Metric NOT IN ('MLR', 'Shared Savings Dollars') THEN SUM(PAID)/ SUM(MM)
- END
1 - CASE
Welcome!
Welcome!
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 660 Datasets
- 117 SQL DataFlows
- 2.2K Magic ETL
- 816 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 84 App Studio
- 46 Variables
- 778 Automate
- 190 Apps
- 482 APIs & Domo Developer
- 83 Workflows
- 23 Code Engine
- 41 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 2 AI Projects and Models
- 18 Jupyter Workspaces
- 411 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 11 Software Integrations
- 145 Manage
- 141 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 115 Community Announcements
- 4.8K Archive