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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
kongyuancn
Helper II
Helper II

data change visualisation

Hi There,

 

I have a problem: I want to show data changed in a matrix.

 

Let's say I have a table:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wck4sMVTSUfIsSc0F0YZKsToogkbYBI2BtAFM0AibdiMk7RgqjZFVGiNpN0AXNMImiKLdBJt2E2zaTbBpN8Wm3RSb301RtccCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Category = _t, Item = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Category", type text}, {"Value", Int64.Type}})
in
    #"Changed Type"

 

It looks like as followings:

kongyuancn_0-1634289449840.png

Then I setup a matrix

kongyuancn_1-1634289533508.png

 

Now I want to label data is changed among several categories. In this picture, I want to let Item1 Cat4 shows a different color because the data changed from 1 to 0. The to be compared categories are controlled by a slicer.

 

Please help to explain how to implement this.

 

thanks in advance

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Thank you for posting your data as M code. Makes it easier to help. Here's one way to do it.  Create a measure like this (replace Items with your actual table name), and use it as your background conditional formatting.

 

mahoneypat_0-1634298034782.pngmahoneypat_1-1634298042211.png

 

ValueChange =
IF (
    CALCULATE ( DISTINCTCOUNT ( Items[Value] )ALLSELECTED ( Items[Category] ) ) > 1,
    "Blue",
    "White"
)

 

Pat

 

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thank you Pat, is it possible to only label item1 cat4 (not the whole row)?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors