Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Checking if a Column Changed from Last Month to This Month

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 NumberThe End of Last MonthToday
1IncreaseIncrease
2Decrease 
3Non ChangeNon Change

*There is a possibility of blank if the account is close.

 

Appreciate for any help.

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

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"

View solution in original post

1 REPLY 1
Vijay_A_Verma
Super User
Super User

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"

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors