Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
louisquinet
Helper I
Helper I

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

louisquinet_0-1707379169045.pnglouisquinet_1-1707379201014.png

 

 

 

21 REPLIES 21
Idrissshatila
Super User
Super User

HEllo @louisquinet ,

 

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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?

louisquinet_0-1707381026119.png

 

 

louisquinet_1-1707381055035.png

louisquinet_3-1707381101469.pnglouisquinet_2-1707381087394.png

louisquinet_4-1707381141852.png

 

 

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
)

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hello

Thank you for your fast answer!

I tried what you told me, you can see the screenshots bellow, but unfortunatelly it is again like before. The maximum of the range is the max value and not the max value *1.05.
Do you know what I did wrong or what I should change to make it work?
Thank you in advance

Louis

louisquinet_0-1707385642997.png

louisquinet_1-1707385670299.pnglouisquinet_2-1707385684828.png

louisquinet_3-1707385730784.png

 

 

@louisquinet ,

 

are you using field parameters ?

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Yes 🙂

@louisquinet ,

 

can you show me the field parameters code



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




louisquinet_0-1707390235813.png

X axis = {
    ("Net Unit Price", NAMEOF('Pricing_Benchmark'[Net Unit Price]), 0),
    ("Maintenance Cost", NAMEOF('Pricing_Benchmark'[Maintenance Cost]), 1)
}

@louisquinet ,

the column names of the field parameters please.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Sorry I'm not sure that I understand your question right, do you mean
Net Unit Price

Maintenance Cost

?

@louisquinet ,

 

try this 

 

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


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thank you for your fast answer. When I try your code I receive the following error:

louisquinet_0-1707393193121.png

 

@louisquinet ,

 

try this

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


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thank you very much, the error message is gone.

I still have a problem:
So this is a screenshot about how it was before:

louisquinet_1-1707394688219.png

When I add "Range X-axis as conditional formatting, my graph disappears:

louisquinet_2-1707394793730.png

louisquinet_3-1707394846934.png

Do you have any idea why?

Thank you for all your help!

Louis

 

@louisquinet , click on the see details of the error and show me the error.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Sorry, of course 🙂 I forgot to send it.

louisquinet_0-1707395530999.png

 

@louisquinet ,

try this

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


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




I see that in my last message was a fault from me, but it still does not work...
This is what I tried now:

louisquinet_0-1707466067481.png

Range X-axis =
SWITCH(
    TRUE(),
    SELECTEDVALUE('X axis'[X axis Order]) = 0, 2 * SELECTEDVALUE('Pricing_Benchmark'[Net Unit Price]),
    SELECTEDVALUE('X axis'[X axis Order]) = 1, 2 * SELECTEDVALUE('Pricing_Benchmark'[Maintenance Cost])
)

I remarked that "X axis order" and "X axis fields" possible, but they both don't work 😞

louisquinet_1-1707464976672.pnglouisquinet_2-1707465004742.png

Hi!

Thank you for your answer!
Power BI gives me this error message: Column 'order' in table 'X axis' cannot be found or may not be used in this expression. 😞

louisquinet_0-1707464161499.png

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors