Forum Discussion
Problem with Power BI Desktop Calculations
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- JATG2 years agoRegular Visitor
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- lbendlin2 years agoSuper User
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.