Forum Discussion

louisquinet's avatar
louisquinet
Helper II
2 years ago

Change range Y-axis

Hello

In my scatter chart the highest value is not very visible. It is always at the maximum and because of that you can only see half a circle or even a quarter of a circle. I would like to change the range of my x and y-axis (which is now (0,Auto)) to (0,max + 5%). Does anyone know how I have to do this? I have no experience with functions in Power BI and after some trial and error I still don't know how to do it...

Thank you in advance
Louis

 

 

 

21 Replies

  • HEllo louisquinet ,

     

    create a measure to calculate the number of current + 5% and add it in the fx in the maximum to be dynamic.

    • louisquinet's avatar
      louisquinet
      Helper II

      Thank you very much! It works 🙂

      I still have an aditional question.

      I have the possibility to change my x-axis as you can see on the screenshot. At this moment it works perfectly for the net unit price but when I change it to maintenance cost (which is mucg lower) it keeps the same range for the x-axis which is really not convenient. Do you know how to do change this?

       

       

       

       

      • Idrissshatila's avatar
        Idrissshatila
        Super User

        Hello louisquinet ,

         

        try this instead of your measure and specify the number you want to multiply the value with in the second condition

        Measure = 
        SWITCH(
            TRUE(),
            ISFILTERED('Pricing_Benchmark'[Net Unit Price]) = TRUE(), 1.05 * SELECTEDVALUE('Pricing_Benchmark'[Net Unit Price]]),
            ISFILTERED('Pricing_Benchmark'[Maintenance Cost]) = TRUE(), 2 * SELECTEDVALUE('Pricing_Benchmark'[Maintenance Cost]),
            // Add more conditions as needed
            BLANK() // Default value if no conditions are met
        )