I have a data set like this :
I have to calculate the average of the max of each name. But I must have just the mean value like the table below :
Solved! Go to Solution.
@Jeremy19 I have done it like this
maxval := CALCULATE(MAX('Table'[Column2]),ALLEXCEPT('Table','Table'[Column1])) maxvalfilter := IF(MAX('Table'[Column2])=[maxval],[maxval]) summaxval := CALCULATE(SUMX('Table',[maxvalfilter]),ALL('Table')) count := CALCULATE(CALCULATE(COUNTROWS('Table'), FILTER('Table','Table'[Column2]=[maxvalfilter])),ALL('Table')) average := DIVIDE([summaxval],[count])
New Animated Dashboard: Sales Calendar
Thanks for your help. But the solution does not take into account all the filters of the page like the group or the date.
In my actual dataset the expected value here is 1174
@Jeremy19 , Please find the attached file after the signature.
Measure = calculate(averageX(values('Table'[Name]), calculate(max('Table'[Var1]))),all('Table'))
@Jeremy19 , Try measures like
averageX(values(Table[Name]), calculate(max(Table[Var1]), allexcept(Table, Table[Name])))
This time I have an identical value, but it is not the right result. This measure does not take into account different filters that I have such as the date or the positions of the players.
Just with a small change to adapt to the filters it was the right solution
Check out new user group experience and if you are a leader please create your group
Click here to read more about the April 2021 Updates!
100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.
See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.