Forum Discussion
BInewbie
8 years agoFrequent Visitor
Create dynamic X asix
Hi All, I am trying to create a dynamic X axis where by the user should be able to select the variable they want to see on the X axis, with the Y axis fixed to Sales, e.g. Sales by Country, Sales...
Anonymous
8 years agoNot applicable
BInewbie you use the same logic for x axis as well.
switch(true(),
selected value from slicer = sales by store, [Store],
selected value from slicer = sales by dimension 2, [Dimension2],
selected value from slicer = sales by city, [City],
....
)
BInewbie
8 years agoFrequent Visitor
Anonymous
When im using the switch funciton, it is only allowing me to select measures rather than fields. Any advice?
Similarly in the video, only measures are used.
- Anonymous8 years agoNot applicable
BInewbie yeah i just realized that, this actually works in tableau lol, that is why i assumed here as well, my bad.
here is another option https://community.powerbi.com/t5/Desktop/Dynamic-change-in-X-Axis/td-p/86167