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! Learn more

Reply
michael_knight
Post Prodigy
Post Prodigy

Same DAX Formula yielding different results - Column and Measure

Hi,

 

I'm trying create a column which uses the same formula as a measure I created. I'm using the same formula as the measure because I know it works. 

 

This is what the results are with the measure. The measure in question is "NEW MEASURE". These are the results I am after.

Measure Results.PNG

This is what the results are in the table. The colum in question is "NEW MEASURE COLUMN". I want the results to replicate those in the first image

Tables Results.PNG

NEW MEASURE = var acceptedmarket = SUM(Sheet1[Accepted Offer/Market Value])

var InsideOrOutside= 
IF(acceptedmarket <95, "Outside",
IF(acceptedmarket >105.51, "Outside",
IF(acceptedmarket <=105.50, "Inside"))) 


var AcceptedOffer = SUM(Sheet1[Accepted Offer])

return

IF(AcceptedOffer < 70000 && [DifferenceAcceptedSpread] <=5000, "Inside", InsideOrOutside)

 

The goal for this is to have a column of the results from the measure and then create a measure to count the number of  records that are"Inside" or "Outside" 

 

I'll add a PBIX of the data file

https://www.dropbox.com/s/dux2gr6bvf3vcd8/hELP.pbix?dl=0

 

Thank you,

Mike

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@michael_knight 

In you pbix, measure only considers the current property, column looks at all properties. 

To make them equivalent, you could add a filter in the column formula. 

 

NEW MEASURE COLUMN = 
var acceptedmarket = CALCULATE(SUM([Accepted Offer/Market Value]),ALLEXCEPT(Sheet1,Sheet1[Property]))

var InsideOrOutside= 
IF(acceptedmarket <95, "Outside",
IF(acceptedmarket >105.51, "Outside",
IF(acceptedmarket <=105.50, "Inside"))) 

var AcceptedOffer = CALCULATE(SUM(Sheet1[Accepted Offer]),ALLEXCEPT(Sheet1,Sheet1[Property]))

return
IF(AcceptedOffer < 70000 && [DifferenceAcceptedSpread] <=5000, "Inside", InsideOrOutside)

 

Best regards
Paul Zheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@michael_knight 

In you pbix, measure only considers the current property, column looks at all properties. 

To make them equivalent, you could add a filter in the column formula. 

 

NEW MEASURE COLUMN = 
var acceptedmarket = CALCULATE(SUM([Accepted Offer/Market Value]),ALLEXCEPT(Sheet1,Sheet1[Property]))

var InsideOrOutside= 
IF(acceptedmarket <95, "Outside",
IF(acceptedmarket >105.51, "Outside",
IF(acceptedmarket <=105.50, "Inside"))) 

var AcceptedOffer = CALCULATE(SUM(Sheet1[Accepted Offer]),ALLEXCEPT(Sheet1,Sheet1[Property]))

return
IF(AcceptedOffer < 70000 && [DifferenceAcceptedSpread] <=5000, "Inside", InsideOrOutside)

 

Best regards
Paul Zheng

Brilliant @Anonymous, exactly what I was after. Thank you very much 

 

And thank you too, @amitchandak. I appreciate the help guys

 

Thanks,

Mike

amitchandak
Super User
Super User

Column gets executed and values are stored in the table. It is pre-calculated. It always has a row context unless formula forces it ignores.

Measure, on the other hand, is the definition and what is the row context is very important.

Refer this: https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

 

Also, check this file. How the 4 ways, measure way and column way of having date diff is different:https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

 

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

@michael_knight Does the above reply helps. if you need more help make me @

Appreciate your Kudos.

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

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