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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Formatting text value within table

Hello dear super users

 

Could I please get some advice for formatting the text values in the table please . 

 

I have created a staff leave report and each letter repressent different leave type, how can i format the letters with different colors ? In the table I have the staff names and the date (only 1-31) as it has a slicer filter out each month. 

David_DF_0-1633477694646.png

below is the value area where the letters needs to format with different colors. I have used CONCATENATEX to convert the numbers to the letter as a measure.

David_DF_1-1633477765152.png

 

Many thanks

 

1 ACCEPTED SOLUTION

Remove two of the closing brackets I think.

 

Assign the same formatting to each column unfortunately. So pick the column and choose the same measure field. A little tedious.

 

KNP_0-1633746537371.png

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

9 REPLIES 9
KNP
Super User
Super User

I think I understand what you're wanting to acheive. Check out this and see if you can relate it to what you're trying to do.

https://www.youtube.com/watch?v=SO4mk1H94OA&ab_channel=EnterpriseDNA 

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
Anonymous
Not applicable

just had a look and it does helps but my knowledge is very limited as I am very new to power bi. Thanks for the reply.

 

 

cheers

Can you share the measure you are using that you referred to?

I may be able to help more with a little more detail.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

What you're looking to do is set the conditional formatting based on your criteria.

If you go into the formatting for the matrix and set the conditional formatting you should be able to get the highlighting you want.

KNP_0-1633486702762.png

 

Have a look at this PBIX file. Very basic version of what I believe you're trying to acheive.

https://drive.google.com/file/d/1-7ToZf0rcB4xzI094EFqF_kNt484uFSc/view?usp=sharing 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
Anonymous
Not applicable

Thanks for the advice and just tried and it worked . My goal for the visual is to format different colors based on the letters . for example, if letter is A then format to Orange , if letter is B then format to Blue ?

 

Thanks

So a measure like this...

Colours = 
VAR v =
    SELECTEDVALUE ( 'Table'[Column1] )
RETURN
    SWITCH (
        TRUE (),
        v = "a", "rgba(255,100,10,1)",
        v = "b", "rgba(10,10,255,1)",
        v = "g", "rgba(10,255,10,1)",
        v = "r", "rgba(255,10,10,1)"
    )

 

Used in conditional formatting...

KNP_1-1633741663819.png

 

Can produce what you want.

 

KNP_2-1633741730042.png

 

PBIX attached for your reference.

Hope this helps.

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
Anonymous
Not applicable

Hi 

 

Many thanks for that . Have used above code in the measure but got this syntax error 

David_DF_0-1633745457798.png

 

I was trying to change the colors for what I needed for this report , also there are 31 columns and how can i include all of them please .

 

 

Thanks

 

 

 

Remove two of the closing brackets I think.

 

Assign the same formatting to each column unfortunately. So pick the column and choose the same measure field. A little tedious.

 

KNP_0-1633746537371.png

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
Anonymous
Not applicable

Thank you so much for your help mr. much appreciated. 

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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