Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I am using this dax but its not working, its only showing stable demand and not low demand or high demand and I have data from 2020 to 2024.
Solved! Go to Solution.
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]))
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-...
- 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"
)
Thank you, I tried but only stable demand is showing.
Please check the formatting of the Demand Index values, they may be Text instead of Decimal numbers.
Thank you, there is no text. I did check the data.
Do a simple test, create two measures:
DC_1=
IF('ItemsOutbound'[Seasonal Demand Index] > 1, "High Demand","N/A")
DC_2=
IF('ItemsOutbound'[Seasonal Demand Index] > 0, "High Demand","N/A")
See which one returns garbage vs the data you have in your column. If both return N/A then there is something wrong with the data.
DC1 all N/A and DC2 all high demand.
So
'ItemsOutbound'[Seasonal Demand Index]
is between 0 and 1. Is this a calculated column? Could you please create another test column in the same table with the below formula and screenshot the values?
D_Index_Forum = VALUE([Seasonal Demand Index])
Values below:
This is for seasonal deman index:
Could you please creenshot the actual column in the table? Also, how do you Sum the D_Index_Forum values, do you have a measure or you let PowerBI to do it?
Thank you, I let PowerBi do the sum. Any specific column for screen capture? I have tons of columns.
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]))
Thank you, I created a measure for both seasonal demand index and demand classification and it worked. Question though, since its a measure, I cant add it as a legend using a clustered chart?
You can't add a measure to Legend.
What do you want to add? Which value or information?
I want to add demand classification as the legend.
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-...
- 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.
pls try this
Demand Classification =
IF('ItemsOutbound'[Seasonal Demand Index] < 0.9, "Low Demand",
IF('ItemsOutbound'[Seasonal Demand Index] <= 1.2,"Stable Demand","High Demand" )
)
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
88 | |
86 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
88 | |
70 | |
66 |