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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
rodrigof
New Member

Summarize text columns with conditional formatting

Hi 

 

So I have a text column that will have the following values one of the following values(green, red, yellow) per row.  I'd like to see if I can summarize that data as follows. 

 

Algorithmically here what I'd like to do(say our sample is of 5 rows), not sure if this is possible with PowerBi. 

1) Find the frequencies of the words in that column

2) If there is a clear max on the word counts (ie. Green shows up 3 times) then the measure should just show "Green" as text; maybe even color the text green.  If instead, Red shows up 3 times then "RED" would be the result, and likewise with Yellow. 

3)If there is a no clear max on the word counts(2 Red, 2 Green, 1 Yellow) we show YELLOW for summary.

 

If possible how would I generalize this so numbers of rows don't matter?  The values for that column will always be those 3(Green, Red, Yellow)

 

Help

 

 

 

 

 

 

First find the frequencies of the green, red and yellow values.  Say for this same its 5 rows and 3 of the values are Green, then I want to show that the summary of this 5 columns is Green.    Say instead the Red Values are 3 then I want to 

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @rodrigof

For your requirements 1,2, I can get the results as expected.

1.png

Create a calculated column

count = CALCULATE(COUNT(Table1[color]),ALLEXCEPT(Table1,Table1[color]))

Measures

max = CALCULATE( MAX([count]),ALL(Table1))

final text = CALCULATE(MAX([color]),FILTER(ALL(Table1),[count]=[max]))

Then edit conditional formatting

2.png3.png

 

 

Best Regards

Maggie

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.