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

Add bold or colour to Dax Measure

Hi Experts

 

I want to show rows which are percentage as black and bold in a matrix table. Either using a measure or a rule

 

My measure is 

Var MTDValue =

Switch(

Average(profitability [chkfmt]),

1. Format(Mth value,  "##0.0%;(##0.0%);-"),

2. Mth value,

)

Return

MthValue

 

Is this possible 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

Yes you can. In this image you'll see I have 2 values in the matrix

cf-rules.png

 

Outbreak Count is a whole number so can be formatted with a grey font.

 

%GT Outbreak Identifier Count is a percentage so can have a separate rule that sets it to a black font.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

Hi @Anonymous 

Yes you can. In this image you'll see I have 2 values in the matrix

cf-rules.png

 

Outbreak Count is a whole number so can be formatted with a grey font.

 

%GT Outbreak Identifier Count is a percentage so can have a separate rule that sets it to a black font.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

Hi @Anonymous 

For the values that are percentages, set the background and font CF 

cf-rules.png

 

You can use a Color scale for the background where both Minimum and Maximum are black, using your chosen field 

black-bg-cf.png

 

Do similar for the font using White/White but you can't set the font weight to bold.

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Phil.. can you set two conditions for CF if the value is % then black font if Value grey front

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.