Forum Discussion
Switch or If Function
- 1 year ago
The D_Index_Forum and the Seasonal Demand Index.
And the classification (your original request) do you do it on the sum of the values on the Seasonal Demand Index?
Instead of letting PowerBI to sum the values, please create a simple measure like this:
Total Demand Index = CALCULATE (SUM([Seasonal Demand Index])) - 1 year ago
You can do it either via a calculated column or a table to Legend.
Since this is a different topic I suggest you close this thread and do some digging first.
These may help:
- https://community.fabric.microsoft.com/t5/Desktop/How-can-I-plot-my-DAX-measure-as-a-legend-as-well-as-values/m-p/2423682#M867725- https://www.reddit.com/r/PowerBI/comments/13gpo7m/is_there_a_way_to_use_a_measure_as_legend_on_a/
- https://community.fabric.microsoft.com/t5/Desktop/Use-measure-as-chart-legend/m-p/1237315#M547738
Hope it helps.
I tried and its still the same.
Heya,
In the Switch function, don't bother with the mid value, go for something like this:
Demand Classification =
SWITCH(
TRUE(),
'ItemsOutbound'[Seasonal Demand Index] > 1.2, "High Demand",
'ItemsOutbound'[Seasonal Demand Index] < 0.9, "Low Demand",
"Stable Demand"
)- reyesdjr1 year agoFrequent Visitor
Thank you, I tried but only stable demand is showing.