The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Good day,
I am trying to see if there is a function that I can use to track if the record of same account number had changed over time. I am looking if I can add an extra column and if there is a change says "Yes" and if there is non says "No". the record of the time has more months, but I had filter the months into the first two months.
Below is an example of my matrix table.
Account Number | The End of Last Month | Today |
1 | Increase | Increase |
2 | Decrease | |
3 | Non Change | Non Change |
*There is a possibility of blank if the account is close.
Appreciate for any help.
Solved! Go to Solution.
Here is one way
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfLMSy5KTSxOxclUitWJVjICMlxS4WKJSckgGaikMZDhl5+n4JyRmJeeis4Bq4oFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Account Number" = _t, #"The End of Last Month" = _t, Today = _t, ColA = _t, ColB = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Account Number", "The End of Last Month", "Today", "ColA", "ColB"}),
#"Added Custom" = Table.AddColumn(#"Replaced Value", "Change", each [a = List.RemoveNulls(List.Skip(Record.ToList(_))),
b = if List.MatchesAll(a, each _=a{0}) then "Yes" else "No"][b])
in
#"Added Custom"
Here is one way
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfLMSy5KTSxOxclUitWJVjICMlxS4WKJSckgGaikMZDhl5+n4JyRmJeeis4Bq4oFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Account Number" = _t, #"The End of Last Month" = _t, Today = _t, ColA = _t, ColB = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Account Number", "The End of Last Month", "Today", "ColA", "ColB"}),
#"Added Custom" = Table.AddColumn(#"Replaced Value", "Change", each [a = List.RemoveNulls(List.Skip(Record.ToList(_))),
b = if List.MatchesAll(a, each _=a{0}) then "Yes" else "No"][b])
in
#"Added Custom"