Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I'm trying to work out the maximum value from a measure based on the Year:Period and use this as the maximum Y-Axis. Based on the following measure which I got from a YouTube video, I'm able to get the maximum Y-Axis value (962 x 1.1=1.06k) based on the Year:Period column in my table:
Measure:
MaxChart All Faults Count - All =
CALCULATE(
MAXX(
ADDCOLUMNS(DISTINCT(ALL(Issues[Year:Period])),"AllCount",[All Faults Count - All]),[AllCount])*1.1,
All(Issues[Status])
)
Screenshot:
But as soon as I add a legend I don't know how to update the measure to get the maximum based on the Status column across all Year:Period. From the screenshot below the maximum Y-Axis should read 716.1 (561 x 1.1).
Any help is greatly appreciated.
Solved! Go to Solution.
Hi @PowerBI-Newbie -Can you try below measure with slight adjustments
MaxChart All Faults Count - All with Status =
CALCULATE(
MAXX(
ADDCOLUMNS(
SUMMARIZE(ALL(Issues), Issues[Year:Period], Issues[Status]),
"AllCount", [All Faults Count - All]
),
[AllCount]
) * 1.1,
REMOVEFILTERS(Issues[Status])
)
this measure should adjust dynamically based on the maximum fault count for each combination
Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @rajendraongole1 ,
I ended up having a play before you responded and found that I can do the following which also worked:
MaxChart All Faults Count - All =
CALCULATE(
MAXX(
ADDCOLUMNS(DISTINCT(ALL(Issues[Year:Period],Issues[Status])),"AllCount",[All Faults Count - All]),[AllCount])*1.1,
All(Issues[Status])
)
I tested yours and it also worked for me so thank you.
Hi @PowerBI-Newbie -Can you try below measure with slight adjustments
MaxChart All Faults Count - All with Status =
CALCULATE(
MAXX(
ADDCOLUMNS(
SUMMARIZE(ALL(Issues), Issues[Year:Period], Issues[Status]),
"AllCount", [All Faults Count - All]
),
[AllCount]
) * 1.1,
REMOVEFILTERS(Issues[Status])
)
this measure should adjust dynamically based on the maximum fault count for each combination
Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @rajendraongole1 ,
I ended up having a play before you responded and found that I can do the following which also worked:
MaxChart All Faults Count - All =
CALCULATE(
MAXX(
ADDCOLUMNS(DISTINCT(ALL(Issues[Year:Period],Issues[Status])),"AllCount",[All Faults Count - All]),[AllCount])*1.1,
All(Issues[Status])
)
I tested yours and it also worked for me so thank you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
99 | |
80 | |
49 | |
48 | |
48 |