cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Getting Difference in Result values in Calculated Column and Measure

Hello Experts,

 

I am caulculating averge per category on a dataset. I am getting diffrence between the result values of calculated column and calculated measure.

Is this possible?

The formulas I am using are -

 

1. Calculated Column- 

CALCULATE(AVERAGE('All Data'[Test Result]),FILTER('All Data','All Data'[Key1]=EARLIER('All Data'[Key1])))
 
2. Calculated Measure-
CALCULATE(AVERAGE('All Data'[Test Result]),FILTER('All Data','All Data'[Key1]=MAX('All Data'[Key1])))
 
Why I am getting diffrence in result values as the dataset is same.
Please help..
1 ACCEPTED SOLUTION

Accepted Solutions
Super User I
Super User I

@pushkard5 

 

 

What if you use this MEASURE...would there still be a difference?

 

CALCULATE(AVERAGE('All Data'[Test Result]),FILTER(all('All Data'),'All Data'[Key1]=MAX('All Data'[Key1])))

 

In a MEASURE, the table passed on to the FILTER function's first argument would be affected by filtered context

but not so in Calculated column

Regards,
Zubair


View solution in original post

2 REPLIES 2
Super User I
Super User I

@pushkard5 

 

 

What if you use this MEASURE...would there still be a difference?

 

CALCULATE(AVERAGE('All Data'[Test Result]),FILTER(all('All Data'),'All Data'[Key1]=MAX('All Data'[Key1])))

 

In a MEASURE, the table passed on to the FILTER function's first argument would be affected by filtered context

but not so in Calculated column

Regards,
Zubair


View solution in original post

@Zubair_Muhammad 

 

Hi, Thanks for your help..this works Perfectly!!

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors