Forum Discussion
Vkl
1 year agoFrequent Visitor
Multiple Data formats inside Switch DAX MEASURE
I have around 10 measures where 5 were just sum aggregation of direct columns and 5 were calculated for percentage. And I wanted to show all these measures in the Matrix visual. So i created a DAX me...
- 1 year ago
bhanu_gautam Thanks for the help! This worked but the individual rows were still blank, so i created a new measure and added all the formats at once and used it as a Value field in the matrix visual. That worked
IF(
NOT(ISBLANK(MetricValue)),
SWITCH(
SelectedMetric,
"Orders", FORMAT(MetricValue, "0.0;(0.0)"),
"Orders SM%", FORMAT(MetricValue/100, "0.0%"),
FORMAT(MetricValue, "0.0") -- Default
),
BLANK()