Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dynamic Y - Axis

Hello Everyone,

 

I've a disconnected table in my file and I want to change my Y-axis of my chart.

 

The metrics are - Number and Percentage.

 

So the scenario is if I select the Number the Y-axis should portray the Number value but when I select the Percentage metric the Y-axis should portray the % values.

 

The problem is it works fine in the Table/Metric visualization by when I select the Bar/Line chart the percentage format shows as X.XX instead of X.XX% on Y-axis.

 

Is it even possible to do this in Power BI right now?

 

Any help would be greatly appreciated.

 

Thanks in advance.

 

Warm Regards,

Harsh

  • parry2k's avatar
    parry2k
    6 years ago

    Anonymous ouch that wouldn't work because you are changing your measure to a TEXT, it is not a number anymore. I would recommend to use a bookmark to switch between visuals.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

     

7 Replies

  • Anonymous I guess the format of your measure is set to %, correct? 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello parry2k,

       

      Below is the measure provided for the reference.

       

      Test =
      IF(SELECTEDVALUE('Table'[Type])= "Number",
      FORMAT(SUM('Table'[Value]), "#,0.00"),
      FORMAT(SUM('Table'[Value]), "0.00%") )
       
      And would like the Y-axis to change accordingly.
      • parry2k's avatar
        parry2k
        Super User

        Anonymous ouch that wouldn't work because you are changing your measure to a TEXT, it is not a number anymore. I would recommend to use a bookmark to switch between visuals.

         

        I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

        Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.