Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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 

  • Hi Anonymous 

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

     

    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

3 Replies

  • Hi Anonymous 

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

     

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

     

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

     

    Regards

    Phil

    • Anonymous's avatar
      Anonymous
      Not applicable

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

  • Hi Anonymous 

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

     

    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