Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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
Hi @rodrigof
For your requirements 1,2, I can get the results as expected.
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
Best Regards
Maggie
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
87 | |
81 | |
64 | |
49 |
User | Count |
---|---|
123 | |
109 | |
88 | |
68 | |
67 |