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
Anonymous
Not applicable

Calculation not working in PBI Desktop.

Hello,


I have a problem with a calculated column (please see below) that is giving the wrong result for the Net Strategic Value in my PBI table.
The result should be around 40 and not 80.

As an example, I assume if the lowest value in the range of values is -50,000 and the highest +50,000, -25,000 would have a strategic value of 25 as it’s a quarter of the way between.

What can I do to have the correct strategic value for negative numbers?

 

ROG_BI22_0-1646993678690.png

 

Net Surplus Sale Strategic Value =
var Max_value = MAX(Costs[Net Surplus Generated from Sale])
var Min_Value = MIN(Costs[Net Surplus Generated from Sale])
return ((Costs[Net Surplus Generated from Sale]-Min_Value) / (Max_valueMin_Value))*100
 
FYI, I tried the calculated column below, but the result was the same.
Net Surplus Sale Strategic Value =
var Max_value = CALCULATE(MAX(Costs[Net Surplus Generated from Sale]), ALL())
var Min_Value = CALCULATE(MIN(Costs[Net Surplus Generated from Sale]), ALL())
return ((Costs[Net Surplus Generated from Sale]-Min_Value) / (Max_value- Min_Value))*100
 
Many thanks!
5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous ,  This need to be a measure like

 

Net Surplus Sale Strategic Value =
var Max_value = CALCULATE(MAX(Costs[Net Surplus Generated from Sale]), ALL())
var Min_Value = CALCULATE(MIN(Costs[Net Surplus Generated from Sale]), ALL())
 
return Divide(Sum(Costs[Net Surplus Generated from Sale])-Min_Value, (Max_value- Min_Value))*100

 

The first calculation you have given can work as new column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for your reply @amitchandak 
But I've tried it a measure and I get exactly the same result. 

ROG_BI22_0-1646997020463.png

 

@Anonymous ,

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Unfortunately, I don't have permission to share pbix files here. 

Anonymous
Not applicable

Hi @Anonymous,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Notice: you can upload to the network drive and share links here or paste the dummy data on your report in table format.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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