Forum Discussion
Problem with Power BI Desktop Calculations
Hello, I apologize, I didn't know how to do it. I'm leaving you the link to download the files on Drive. I appreciate your support in advance.
https://drive.google.com/drive/folders/1rGf3rtCbFv6jJYF0B78uFT0jEzmN9fWh?usp=drive_link
Your measure is aggregated by Date, Warehouse, and Product Number. Calculated columns work on row level, not on aggregation level. Do you want to apply your rules to the individual rows, or do you want to repeat the same result for all combinations of Date, Warehouse, Product?
By the way, your measure can be refactored a bit:
Evaluation = SWITCH(TRUE(),
[SUM Order]<=0 || [AVG SL]>=1,"",
[AVG InvN]>=[SUM Order],"Not Assorted",
[SUM Order]>(3*[AVG NetOrder]),"Ext Demand",
[AVG InvT]=0,"Out of Stock",
[AVG InvT]>0 && [AVG InvT]<(3*[AVG NetOrder]),"Ins Supply",
[AVG InvT]>0 && [AVG InvT]>=(3*[AVG NetOrder]),"Prod Transit",
"")
- JATG2 years agoRegular Visitor
What I'm looking for is to be able to use the calculated column "Test" on a Pareto chart as the X-axis and get the same results as the "Hypothesis" field. This way, when I compare the results, they match.
- lbendlin2 years agoSuper User
That's not how calculated columns work. Create a disconnected table with your buckets and then adjust your measure to return the result for each of the buckets. This will give you the added flexibility of being able to sort the buckets as you like (but not really pareto style...)