Forum Discussion
Log and Linear Scale slicer
Hi all,
I'm trying to be able to switch between log and linear scale for a bar chart using a slicer. Similary to what's shown in https://blog.mi4.com/analytics/power-bi-logarithmic-linear-axis/ so I know it's possible at some level. However, they use a line chart. I haven't been able to figure out the right syntax for the measure if there is a change.
10 Replies
- MFelix
Super User
Hi goalie_ ,
there is a small trick that you need to do before making this work, you need to select the Y-axis and place the Scale as Log then add the measure for the selection of the slicer and eveything will work proper, however I must warn you that this look funny in a bar chart since there are two values for each bar and the x-axis is on the middle.
- goalie_
Helper III
Hi MFelix , yes I understand that. I have a categorical x-axis and usage amount on the y-axis. I am not able to place the measure into the slicer at all. The measure I'm using is, which is slightly changed,
LinLog = IF(SELECTEDVALUE('Scale'[ScaleType]) = "Linear", CALCULATE(sum(USAGE_AMOUNTS), CATEGORIES)*0,BLANK())I don't know if I changed it correctly.
- v-eachen-msft
Community Support
- PaulDBrown
Community Champion
One simple options is to use bookmarks with buttons to toggle between visuals.