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.
Hi all
I have the following data and need a way to create the column at the end (in bold text):
Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 | Column 9 | Column 10 | Required Column |
A | A | A | A | A | A | A | A | A | A | A |
A | A | A | B | A | A | A | A | B | A | A |
B | A | A | B | A | A | A | A | B | A | A,B |
B | B | B | A | B | B | A | A | B | B | B,A |
the measure needs to present the values which occupy 3 or more of the 10 columns, in order of how many times they occur.
So, for row 1, A is the only answer.
For row 2, A is the only answer as B occurs only twice.
For row 3, A occurs 7 times and B 3 times, so A,B is presented.
For row 4, A occurs 3 times and B 7 times, so B,A is presented.
Is this possible?
Solved! Go to Solution.
Sorry I missed that point
Here is the revised code
Column = VAR temp1 = { [Column 1], [Column 2], [Column 3], [Column 4], [Column 5], [Column 6], [Column 7], [Column 8], [Column 9], [Column 10] } VAR temp2 = FILTER ( ADDCOLUMNS ( DISTINCT ( temp1 ), "MyCount", COUNTROWS ( FILTER ( temp1, [Value] = EARLIER ( [Value] ) ) ) ), [MyCount] >= 3 ) RETURN CONCATENATEX ( temp2, [Value], ",", [MyCount], DESC )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |