Forum Discussion

aileenkaz's avatar
aileenkaz
Frequent Visitor
1 year ago
Solved

Dynamic Y-axis range in Line chart

Hello! I have four line charts shown next to each other. They contain the same data F_merged[Value] but there us a filter used on each of them. I need to have the same Y-axis range for all four cha...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi aileenkaz , hello parry2k, thank you for your prompt reply!

     

    Please try the following measure:

    ValueMeasure = MAX('Table'[Value])

     

    F_YMax = 
     IF(
            MAXX(ALL('Table'), 'Table'[ValueMeasure]) = 0, 
            50, 
            IF(
                CEILING(MAXX(ALL('Table'), 'Table'[ValueMeasure]), 10) < 60, 
                CEILING(MAXX(ALL('Table'), 'Table'[ValueMeasure]), 50), 
                100
            )
        )

     

     Result:

     

     

     

    Best regards,

    Joyce

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.