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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nazia786
Regular Visitor

Y- axis Range with intervals

Hi I have cost column values  from  0 to 4500000. i need to create Y axis range like below with interval of 100000. Please advise how can i do it in power BI Bar chart. Thank you.

Y axis should be like 0 to 100000, 100000  to 200000, 200000  to 300000  and so on 4000000 to 4100000.

 

 
 
 

 

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Nazia786,

You can add a calculated column to calculate with raw value rate and store it in a variable, then you can use this to dynamic define the group range based on the variable.
For the end part of the ranges that not similar to other common calculations, you can add if statements to check these excepted scenarios and write specific expressions to handle them.

Below is the sample formula, you can try it if helps: 

Dynamic range = 
VAR _unit = 10
VAR _rate =
    INT ( DIVIDE ( [Amount], _unit ) )
RETURN
    IF ( _rate >= 40, "400 to 410", _rate * _unit & " to " & ( _rate + 1 ) * _unit )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Nazia786,

You can add a calculated column to calculate with raw value rate and store it in a variable, then you can use this to dynamic define the group range based on the variable.
For the end part of the ranges that not similar to other common calculations, you can add if statements to check these excepted scenarios and write specific expressions to handle them.

Below is the sample formula, you can try it if helps: 

Dynamic range = 
VAR _unit = 10
VAR _rate =
    INT ( DIVIDE ( [Amount], _unit ) )
RETURN
    IF ( _rate >= 40, "400 to 410", _rate * _unit & " to " & ( _rate + 1 ) * _unit )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.