The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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])
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
18 | |
18 | |
15 | |
13 |
User | Count |
---|---|
42 | |
36 | |
23 | |
22 | |
17 |