Forum Discussion
Help needed with dynamic Max axis calculation measure.
- 1 year ago
Hi VulnBi,
Thank you for reaching out to the Microsoft fabric community forum. Thank you pankajnamekar25, for your inputs on this issue.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
For creating column name TTR_Primary_Axis_Fixed in Jira_SLA_Report Table:
TTR_Primary_Axis_Fixed =VAR Metric = SELECTEDVALUE(Time_To_Resolve[Time_To_Resolve Order])
VAR MaxValue =
MAXX(
ADDCOLUMNS(
SUMMARIZE(
ALL(Jira_SLA_Report),
Jira_SLA_Report[Resolved_Year],
Jira_SLA_Report[Resolved_Month]
),
"Value",
SWITCH(
TRUE(),
Metric = 0, AVERAGE(Jira_SLA_Report[Average_Resolution_Time]),
Metric = 1, AVERAGE(Jira_SLA_Report[Median_Resolution_Time]),
Metric = 2, AVERAGE(Jira_SLA_Report[Percentile_Resolution_Time])
)
),
[Value]
)
RETURN
MaxValue
I am also including .pbix file for your better understanding, please have a look into it:
I hope this could resolve your issue, if you need any further assistance, feel free to reach out. If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hello VulnBi
Try this measure
TTR_Primary_Axis =
VAR Metric = SELECTEDVALUE(Time_To_Resolve[Time_To_Resolve Order])
VAR MaxValue =
MAXX(
ADDCOLUMNS(
SUMMARIZE(
CALCULATETABLE(
Jira_SLA_Report,
KEEPFILTERS(Jira_SLA_Report[Resolved_Year]),
KEEPFILTERS(Jira_SLA_Report[Resolved_Month])
),
Jira_SLA_Report[Resolved_Year],
Jira_SLA_Report[Resolved_Month]
),
"Value", SWITCH(
TRUE(),
Metric = 0, [Average_Resolution_Time],
Metric = 1, [Median_Resolution_Time],
Metric = 2, [Percentile_Resolution_Time]
)
),
[Value]
)
RETURN
MaxValue
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
- VulnBi1 year agoRegular Visitor
Thank you for your help!
Sadly I am getting the following error in the visual:I managed to fix it by adding KEEPFILTERS(VALUES(Jira_SLA_Report[Resolved_Year])),
But the outcome is still the same.