Forum Discussion
how to keep axis range when filtering graphs
Hi,
I have a graph showing age (x) and number of people (y). I have another graph on the same page, where I can select a group of people that gets highlited on the first graph.
However it is hard to see the differences - when in one goup there are just few ages, the x-axis ranges moves completely so I cant see how it compares to other groups (or all groups when noting is selected).
I have found a similar problem, but is not quite relevant here, because it was about having empty cells and not having different range:https://community.powerbi.com/t5/Desktop/how-to-prevent-filter-changes-from-effecting-x-axis/td-p/1277355
Thank you 🙂
Hi Anonymous ,
Please create these two measures and set them to the minimum and maximum values of the X-axis respectively.
Min_X = MINX ( ALL ( 'Table' ), 'Table'[age] )Max_X = MAXX ( ALL ( 'Table' ), 'Table'[age] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- speedrampsSuper User
Create just one graph
with age (x) and number of people (y) and legend = group.
then you can compare groups A,B, C, D, E on a line or stack graph.
Also add slicer = group with multipole selecrtion turned on.
the the user can pick and choose which groups they want to compare. eg just A, C and E
I have helped you, now please help me by giving kudos.
Click the thumbs up and accept as solution button.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each solver will get the kudos they deserve. Thank you ! 😎
- AnonymousNot applicable
Hi, thank you for your reply.
Your solution would work in some cases however it is more like a different approach.
I would still like to know if it i possible to keep the axis fixed.
(slicer doesn´t seem to help with that).
V.
- v-kkf-msftCommunity Support
Hi Anonymous ,
Please create these two measures and set them to the minimum and maximum values of the X-axis respectively.
Min_X = MINX ( ALL ( 'Table' ), 'Table'[age] )Max_X = MAXX ( ALL ( 'Table' ), 'Table'[age] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.