cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pushkard5 Regular Visitor
Regular Visitor

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
Super User

Re: Getting Difference in Result values in Calculated Column and Measure

@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

2 REPLIES 2
Super User
Super User

Re: Getting Difference in Result values in Calculated Column and Measure

@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

pushkard5 Regular Visitor
Regular Visitor

Re: Getting Difference in Result values in Calculated Column and Measure

@Zubair_Muhammad 

 

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