Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have some data, shown below, and i want to be able to highlight if there was a change in serial number for a particular ID, by comparing to the previous days data. Any ideas what equation would give me the output in red
Regards,
David
Solved! Go to Solution.
Hi,
You can use the formula below to create a calculated column.
The trick is to use EARLIER() function that will allow you to check, for each ID, if the serial number has changed compared to the day before.
Calculated Column =
VAR __var1 = 'Table'[Serial Number]
VAR __var2 = CALCULATE(VALUES('Table'[Serial Number]), FILTER(ALL('Table'), 'Table'[Date Created] = EARLIER('Table'[Date Created]) - 1 && 'Table'[ID] = EARLIER('Table'[ID])))
RETURN
IF(ISBLANK(__var2), "NO", IF(__var1 = __var2, "NO", "YES"))
Hi,
You can use the formula below to create a calculated column.
The trick is to use EARLIER() function that will allow you to check, for each ID, if the serial number has changed compared to the day before.
Calculated Column =
VAR __var1 = 'Table'[Serial Number]
VAR __var2 = CALCULATE(VALUES('Table'[Serial Number]), FILTER(ALL('Table'), 'Table'[Date Created] = EARLIER('Table'[Date Created]) - 1 && 'Table'[ID] = EARLIER('Table'[ID])))
RETURN
IF(ISBLANK(__var2), "NO", IF(__var1 = __var2, "NO", "YES"))
Thank you. This worked. I really appreciate your help 😃
Now to understand why it worked 🤔
pls try this
Thank you. Unfortunately i'm getting this error. f_serialnumber is formatted as Text
DAX comparison operations do not support comparing values of type True/False with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |