Forum Discussion
Help in limiting the X-axis per value
I want to draw a line that represents the allowed limit for each level and display each item's value relative to that range. For example, Level 1 would show a limit of ±50, Level 2 would show ±30, and Level 3 would show ±10. Each item should appear on the chart along with its corresponding limit line.
Is there a way to achieve this?
Thanks for your help!
| Level | item 1 | item 2 | item 3 | item 4 |
| Level 1 (+/-50) | -150 | 80 | 100 | 40 |
| Level 2 (+/-30) | 50 | -20 | 30 | 60 |
| Level 3 (+/-10) | 20 | 50 | 5 | 15 |
Hi topazz11
Sample data:
Create Two Additional measure:
Upper Limit = VAR CurrentLevel = SELECTEDVALUE(data[Level]) RETURN SWITCH( CurrentLevel, "Level 1", 50, "Level 2", 30, "Level 3", 10, BLANK() ) Lower Limit = VAR CurrentLevel = SELECTEDVALUE(data[Level]) RETURN SWITCH( CurrentLevel, "Level 1", -50, "Level 2", -30, "Level 3", -10, BLANK() )Results: With a line chart
x-axis: Item
Y-axis = value, Upper Limit, Lower Limit
Small multiple: Level
File: https://drive.google.com/file/d/1UvQLP7hJxIJQ8d8lJXtflZQdBFlVWn1E/view?usp=sharing
Note: If you like to keep only one visual at a time use a slicer where the default selected value is any level.
Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!I’d love to stay connected. Join me on LinkedIn for more tips, learning paths, and real-world Fabric & Power BI solutions.
4 Replies
- RoyelSuper User
Hi topazz11
Sample data:
Create Two Additional measure:
Upper Limit = VAR CurrentLevel = SELECTEDVALUE(data[Level]) RETURN SWITCH( CurrentLevel, "Level 1", 50, "Level 2", 30, "Level 3", 10, BLANK() ) Lower Limit = VAR CurrentLevel = SELECTEDVALUE(data[Level]) RETURN SWITCH( CurrentLevel, "Level 1", -50, "Level 2", -30, "Level 3", -10, BLANK() )Results: With a line chart
x-axis: Item
Y-axis = value, Upper Limit, Lower Limit
Small multiple: Level
File: https://drive.google.com/file/d/1UvQLP7hJxIJQ8d8lJXtflZQdBFlVWn1E/view?usp=sharing
Note: If you like to keep only one visual at a time use a slicer where the default selected value is any level.
Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!I’d love to stay connected. Join me on LinkedIn for more tips, learning paths, and real-world Fabric & Power BI solutions.
- v-tejramaCommunity Support