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.
Hello,
I am trying to create a column that picks out the minimum value from a number of columns.
I have posted a table below with my desired outcome
Can someone advise?
Many Thanks
ID | A | B | C | D | E | F | G | Desired Column |
36185098 | 19.98 | 39 | 14.7 | 0 | 0 | 0 | 0 | C |
36855167 | 22 | 29.5 | 18 | 0 | 18 | 17.8 | 18.5 | F |
34938430 | 25.98 | 27.98 | 17.8 | 0 | 0 | 20.5 | 17 | G |
38001554 | 23.6 | 27.3 | 16.2 | 8 | 16.2 | 0 | 0 | D |
32315810 | 0 | 27.1 | 16.7 | 0 | 0 | 16.5 | 16.1 | G |
32125239 | 22.1 | 27 | 16.4 | 0 | 0 | 16.1 | 17.8 | F |
Solved! Go to Solution.
After unpivoting your Letter Columns, you can use following MEASURE to get the desired Output
DesiredResult = VAR MinValue = CALCULATE ( MIN ( TableName[Value] ), TableName[Value] <> 0 ) RETURN CONCATENATEX ( FILTER ( TableName, TableName[Value] = MinValue ), TableName[Attribute], ", " )
Easiest thing to do would be to unpivot your letter columns. At that point, the problem is trivial.
make sure to specify that you dont care about zeros, as in your dataset, the lowest value is zero, even though its your outcome in the sample data specifies you want the lowest value that is greater than zero.
After unpivoting your Letter Columns, you can use following MEASURE to get the desired Output
DesiredResult = VAR MinValue = CALCULATE ( MIN ( TableName[Value] ), TableName[Value] <> 0 ) RETURN CONCATENATEX ( FILTER ( TableName, TableName[Value] = MinValue ), TableName[Attribute], ", " )
With your sample data
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |