Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello!
I have the measure with SWITCH and SELECTEDVALUE, which doesn't show totals in the table.
The measure:
sales_yesterday =
CALCULATE (
SWITCH (
SELECTEDVALUE ( business_areas_table[Business Area] ),
"Recipe Kits", [RK_sales],
"Events", [events_sales]
),
'DeliveryDimDate'[Yesterday] = 1
)
Result (totals are blank):
Could anybody help where is the problem please?
Thank you!
Solved! Go to Solution.
Hi @katebrk2 ,
This is due to the context, please try to create a new measure with below dax formula based on your measure.
Measure =
SUMX ( VALUES ( business_areas_table[Business Area] ), [sales_yesterday] )
For @Igna's suggestion, ROLLUP() function can only be used within a SUMMARIZE expression, not suitable for this case.
For more details, you can read related document: ROLLUP function (DAX) - DAX | Microsoft Learn
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @katebrk2 ,
This is due to the context, please try to create a new measure with below dax formula based on your measure.
Measure =
SUMX ( VALUES ( business_areas_table[Business Area] ), [sales_yesterday] )
For @Igna's suggestion, ROLLUP() function can only be used within a SUMMARIZE expression, not suitable for this case.
For more details, you can read related document: ROLLUP function (DAX) - DAX | Microsoft Learn
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
could you try with that formula :
sales_yesterday =
CALCULATE (
SWITCH (
SELECTEDVALUE ( business_areas_table[Business Area] ),
"Recipe Kits", [RK_sales],
"Events", [events_sales]
),
'DeliveryDimDate'[Yesterday] = 1,
ROLLUP('business_areas_table'[Business Area])
)
You must use the ROLLUP function to explicitly include totals for the 'Business Area' column. This should ensure that the totals are calculated correctly in your table visualization.
Hope it helps
Igna
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 41 | |
| 21 | |
| 18 |