Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I need some assistance in finding a solution to this problem. I want to create a column that would display the average of [Value] based on [ID] if the [Location] column has common values. Please see example below. Thank you kindly
Solved! Go to Solution.
Hi @sammy3 ,
Create a measure as below:
Measure = CALCULATE(AVERAGE('Table'[value]),FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])&&'Table'[Location]=MAX('Table'[Location])))
Or you could create a calculated column as below if needed :
Column = CALCULATE(AVERAGE('Table'[value]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Location]=EARLIER('Table'[Location])))
And you will see:
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @sammy3 ,
Create a measure as below:
Measure = CALCULATE(AVERAGE('Table'[value]),FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])&&'Table'[Location]=MAX('Table'[Location])))
Or you could create a calculated column as below if needed :
Column = CALCULATE(AVERAGE('Table'[value]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Location]=EARLIER('Table'[Location])))
And you will see:
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
This works perfectly but is then impacted by my page filters. If I add the column in the Power Query Filter I assume the filters added later in the desktop will not change the value but I'm struggling to translate to DAX
@sammy3 , Try like
calculate(Average(Table[value]), allexpect(Table, Table[ID], Table[Location]))
or
calculate(Average(Table[value]), filter(allselected(Table), Table[ID] =max(Table[ID]) && Table[Location] = max(Table[Location])))
or
averageX(summarize(Table, Table[ID], Table[Location],"_1",Average(Table[value])),[_1])
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |