Forum Discussion

VulnBi's avatar
VulnBi
Regular Visitor
1 year ago
Solved

Help needed with dynamic Max axis calculation measure.

Hello All, I have a measure that should calculate the max value for the primary and secondary Y axix in a Line stacked column chart. It works well as long as I am trying to slice the chart with th...
  • v-kpoloju-msft's avatar
    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.