Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a ratio measure, and would like to take the yearly average of that measure.
Here is a screenshot of what I would like to achieve for the new average measure, Measure 2:
Measure 1 is calculated from 2 columns in my dataset, using DAX: Measure 1 = DIVIDE(Table1[Column1],Table1[Column2],0)
I have tried using this formula for Measure 2:
Solved! Go to Solution.
@Anonymous ,
Measure 2 = calculate(AvergaeX(Table[Measure1]), filter(allselected(Table),Table[Year]=max(Table[Year])))
or
Measure 2 = calculate(AvergaeX(Table[Measure1]), filter(all(Table),Table[Year]=max(Table[Year])))
1.Use Average
Divide column =
DIVIDE ( 'average table'[column1], 'average table'[Column2], 0 )
average measure =
CALCULATE (
AVERAGE ( 'average table'[Divide column] ),
ALLEXCEPT ( 'average table', 'average table'[Year] )
)
2.Use Averagex
Measure 7 =
SUM ( 'average table'[Divide column] )
use avaragex =
AVERAGEX ( ALLEXCEPT ( 'average table', 'average table'[Year] ), [Measure 7] )
My visualization looks like this:
1.Use Average
Divide column =
DIVIDE ( 'average table'[column1], 'average table'[Column2], 0 )
average measure =
CALCULATE (
AVERAGE ( 'average table'[Divide column] ),
ALLEXCEPT ( 'average table', 'average table'[Year] )
)
2.Use Averagex
Measure 7 =
SUM ( 'average table'[Divide column] )
use avaragex =
AVERAGEX ( ALLEXCEPT ( 'average table', 'average table'[Year] ), [Measure 7] )
My visualization looks like this:
@Anonymous ,
Measure 2 = calculate(AvergaeX(Table[Measure1]), filter(allselected(Table),Table[Year]=max(Table[Year])))
or
Measure 2 = calculate(AvergaeX(Table[Measure1]), filter(all(Table),Table[Year]=max(Table[Year])))
@amitchandak , I used your formula and changed the averagex part to this:
Hi @amitchandak ,
I cant seem to use that formula. After AverageX, Table[Measure1] does not seem to be an option for the first arguement, only Table is available in the drop down list.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
53 | |
37 | |
32 |
User | Count |
---|---|
99 | |
56 | |
50 | |
43 | |
40 |