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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Margreet
Helper I
Helper I

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 I
Helper I

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

View solution in original post

5 REPLIES 5
Margreet
Helper I
Helper I

@Greg_Deckler it is working, thanks a lot!!

Margreet
Helper I
Helper I

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

Margreet
Helper I
Helper I

@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.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

@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.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors