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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
goalie_
Helper III
Helper III

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 10
PaulDBrown
Community Champion
Community Champion

@goalie_ 

One simple options is to use bookmarks with buttons to toggle between visuals.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






v-eachen-msft
Community Support
Community Support

Hi @goalie_ ,

 

You could try clustered bar chart.

2-1.PNG2-2.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
MFelix
Super User
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.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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. 

Hi @goalie_ ,

 

The measure is not to be placed in the slicer, you need to place the measure on the bar char as a value


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I got it to work if I remove the value in legend. I am using a clustered column chart. I have a field in legend to diffrentiate the categories by location. I am unable to put the measure into the values if I have a field in legend. Is it still possible by tweaking the measure or am I out of luck?

Hi @goalie_ ,

 

In all visualizations when you have a legend you cannot have more than 1 column/measure in the Values part, depending on the type of legend you have you can create a measure to calculate each of those values in the legend and then add the slicer measure.

 

Again if you have 2 or 3 legends values it's simple but if it's 40 that's a problem.

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



When you say legends values, do you mean the number of items in the visual's legend field? or the number of diffrentiators that pop up for that legend? I only have 1 item in the legend field, but depending on my selection, on average 2- 5 diffrentiators pop up. 

 

Do you know how I can manipulate the measure?

I assume you are using a column in the legend, when I refer to the values is how many distinct values are in that legend.

 

For example if you have a Year on the legend and values go from 2015 - 2020 you would one column in the legend and 6 values in the legend.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



yes i am using a column. Creating a measure for each legend value is not possible simply because there are too many. So bottom line is I can either have the legend(w no measure in values) or no legend(w measure in values) correct?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors