Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JATG
Regular Visitor

Problem with Power BI Desktop Calculations

I'm relatively new to using Power BI Desktop, and I need your support because I've been stuck on this issue for weeks without finding a solution.

I was tasked with creating a Pareto chart, but the calculation I've been working on has been giving me errors. I attempted to create the formula in two ways: by calculating a new column and by calculating a new measure. The formula for the measure is correct, meaning it provides the data I need. However, when I replicate the same formula by creating a column, I get different results.

The column calculation is named "Test," and the measure calculation (the one that's correct) is named "Evaluation."

Could you please assist me with this matter?


Evaluation Formula.JPGPhoto 1.JPGDB.JPGTest Formula.JPG

5 REPLIES 5
lbendlin
Super User
Super User

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-...
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/1447...

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",
"")

 

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.

ex2.JPG

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...)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors