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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Format matrix measure based on slicer selection

Hello fellow Power BI developers,

Im working with a star schema sales report containing a fact sales table and related information tables. I have a solution to my problem, but i am wondering if there's an alternative maybe more efficient solution to such a problem.

Lets say i have this kind of slicer filter:
 

Mikas_0-1659948614004.png

And my matrix looks more or less like this:
(Slicer value selected is Growth YoY abs)

Mikas_1-1659949135424.png

If i go to Growth YoY% i want to keep the conditional formatting of data bars and produce a percentage value:

Mikas_2-1659950628301.png

The problem is since FORMAT function returns a string data bars stop working and the Total won't sort my data.
My measure looks like this:

Mikas_3-1659950845220.png

Is there a way to control the format of a produced value so its returned in percentage or a number format (int, double, decimal etc.). ?






1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

2 REPLIES 2
Anonymous
Not applicable

@amitchandak, Thank you for your provided solution. I will look into it immediately and get back to you how it goes !

amitchandak
Super User
Super User

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.