March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Solved! Go to Solution.
Hi, @ShaRaj ,
Please make sure whether you use this code to create a measure instead of a column.
As far as I know, you just need to change EARLIER() to MAX()/SUM() in measure. MAX() for text data and SUM() for number data.
max1 =
MAXX (
FILTER (
'Score Fact Table',
'Score Fact Table'[CalYear] = MAX ( [CalYear] )
&& 'Score Fact Table'[Category] = MAX ( [Category] )
&& 'Score Fact Table'[Sub Category] = MAX ( 'Score Fact Table'[Sub Category] )
),
'Score Fact Table'[Value]
)
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.
Hi ,
iam not getting desired output. instead of taking max of each category for every year ,this returns max value of that particular column
Hi, @ShaRaj ,
Please make sure whether you use this code to create a measure instead of a column.
As far as I know, you just need to change EARLIER() to MAX()/SUM() in measure. MAX() for text data and SUM() for number data.
max1 =
MAXX (
FILTER (
'Score Fact Table',
'Score Fact Table'[CalYear] = MAX ( [CalYear] )
&& 'Score Fact Table'[Category] = MAX ( [Category] )
&& 'Score Fact Table'[Sub Category] = MAX ( 'Score Fact Table'[Sub Category] )
),
'Score Fact Table'[Value]
)
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.
@ShaRaj , try like
max = MAXX(FILTER(allselected('Score Fact Table'),'Score Fact Table'[CalYear]=max([CalYear])
&& 'Score Fact Table'[Category]=max([Category] )
&& 'Score Fact Table'[Sub Category]= max('Score Fact Table'[Sub Category])),
'Score Fact Table'[Value])
or
max = MAXX(FILTER(all('Score Fact Table'),'Score Fact Table'[CalYear]=max([CalYear])
&& 'Score Fact Table'[Category]=max([Category] )
&& 'Score Fact Table'[Sub Category]= max('Score Fact Table'[Sub Category])),
'Score Fact Table'[Value])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |