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 Friends - am looking for a help with the below sample data;
Date | Team | 0-2 days | 3-5 days | >5 days | Ageing Band |
01 09 2020 | ABC | 10 | 25 | 60 | >5 days |
02 09 2020 | XYZ | 0 | 15 | 10 | 3-5 days |
03 09 2020 | STC | 20 | 13 | 1 | 0-2 days |
My requirement is as follows;
1) To identify Highest values in a given row and return corresponding Column Header name into another calculated column named 'Ageing Band'
Please can you help me with DAX for this calculated column?
@navedkhan You can achive your result using power query as well like below
Step 1.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjBUMLBUMDIwMlDSUXJ0cgaShiCmkSmQMAOxYkoNDIxTTRVSEiuLlWJ1gFqMkLREREYBSRDL0BSm11gXWbUxkurgEJAFYKahMYgA6dU1gqqOBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Team = _t, #"0-2 days" = _t, #"3-5 days" = _t, #">5 days" = _t, #"Ageing Band" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Team", type text}, {"0-2 days", Int64.Type}, {"3-5 days", Int64.Type}, {">5 days", Int64.Type}, {"Ageing Band", type text}}),
#"Unpivoted Only Selected Columns" = Table.Unpivot(#"Changed Type", {"0-2 days", "3-5 days", ">5 days"}, "Attribute", "Value")
in
#"Unpivoted Only Selected Columns"
Step 2: Use Matrix visual like below
Proud to be a Super User!
Hey, you could give a try to this
Ageing band =
if(calculate(sum([0-2 days])) > calculate(sum([3-5days])) && calculate(sum([0-2 days])) > calculate(sum([>5days])), ">5 days",
if(calculate(sum([3-5 days])) > calculate(sum([0-2days])) && calculate(sum([3-5days])) > calculate(sum([>5days])), "3-5 days",
"0-2 days"))
@navedkhan , Create a new column like
switch( true() ,
[0-2 days] > [3-5 days] && [0-2 days] > [>5 days] , "0-2 days",
[3-5 days]> [>5 days] , "3-5 days",
">5 days"
)
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 |
---|---|
96 | |
95 | |
80 | |
74 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |