Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have my measure:
DIVIDE
(
SUM(Fact[Hours]) - CALCULATE (SUM( Fact[Hours2]) , ALL(Fact) , Fact[Type]="D" ),
SUM(Fact[Hours])
)
It works fine.
But now I want to use it in another measure to do:
SUM(Fact[Hours]) * MAX(MyMeasure)
And it doesn’t work… Why can't I do MAX(MyMeasure)?
Solved! Go to Solution.
Hi @ovonel ,
As far as I know, you don't need to use MAX() to use a measure, you can use it directly in your code.
MAX() only support to use a column.
Measure =
SUM(Fact[Hours]) * [MyMeasure]
If you want to get MAX from the measure, you can try MAXX().
Measure =
SUM ( Fact[Hours] ) * MAXX ( VALUES ( 'TableName'[KeyColumn] ), [MyMeasure] )
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MAX of mymeasure in which dimension?
I have a fake "Measures" table where I store all my measures.
(I created it using DATATABLE, this approach was recommended from sqlbi website)
Hi @ovonel ,
As far as I know, you don't need to use MAX() to use a measure, you can use it directly in your code.
MAX() only support to use a column.
Measure =
SUM(Fact[Hours]) * [MyMeasure]
If you want to get MAX from the measure, you can try MAXX().
Measure =
SUM ( Fact[Hours] ) * MAXX ( VALUES ( 'TableName'[KeyColumn] ), [MyMeasure] )
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
21 | |
17 | |
16 | |
11 | |
7 |
User | Count |
---|---|
26 | |
25 | |
12 | |
12 | |
12 |