Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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"
)
User | Count |
---|---|
92 | |
87 | |
77 | |
73 | |
68 |
User | Count |
---|---|
116 | |
107 | |
88 | |
65 | |
63 |