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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Margreet
Helper II
Helper II

Bar chart change on y-as between opercentage or number

Hope someone knows the answer. I have a slicer of indicators.

Indicators are a percentages or a number.

For example: 2 indicators: accidents is a number and penalty is a percentage.

 

On the y-aces in the bar chart I want see a percentages when I selected penalty

and see a number when I selected accidents.  Thanks a lot for answering

 

1 ACCEPTED SOLUTION
Margreet
Helper II
Helper II

Super, I tried this tomorrow! I let know of it works!

View solution in original post

5 REPLIES 5
Margreet
Helper II
Helper II

@Greg_Deckler it is working, thanks a lot!!

Margreet
Helper II
Helper II

Super, I tried this tomorrow! I let know of it works!

Margreet
Helper II
Helper II

@Greg_Deckler Thanks, for your answer. I selected with a slicer accidents versus penalty. I use the same measure, sum(value). I don't use fieldparameter. Is that the solution? 

@Margreet OK, if that is the case, then Dynamic Format String is your answer. Basically, you are going to write it like this:

VAR __Item = MAX('Table'[Indicator])

VAR __Result = IF( __Item = "accidents", "0", "0.00%;-0.00%;0.00%"

RETURN
__Result

 

Dynamic Format Strings for measures is a Preview feature that you will have to turn on in the desktop. Once you turn it on then in Measure tools when you select your measure, in the Formatting area of the ribbon, use the Format dropdown to select Dynamic and then paste in your DAX code.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Margreet Hard to be certain of the solution given the information provided. How are you selecting accidents versus penalty? Are you using Field parameters? Are the indicators (values) the same measure or two different measures? Could be a use case for dynamic format strings.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors