How would compare values in column to see if it's changed for a unique item. For example, how would I modify a query to only display a record if the serial number changed for a specific unique device. In this case there is a new record each day for each DeviceID. An example is below. I'm a noob and have no idea where to start. If my question doesn't make sense or you need additional info please let me know. Thanks in advance.
MyInventory_CL
| mvexpand parse_json(Health_s)
| project Date, DeviceID, ['Type'] = Health_s['Type'], ['XOLabel'] = Health_s['XOLabel'],['Serial'] = Health_s['XOSerial Number'], ['Placement'] = Health_s['XOPlNumber'], Status
Date DeviceID Type Label Serial Placement Status
03/10/24 FHDFKJSKFJ5 SSD HFM001TD3GX013N 25359_8549_2286_F168_9FFA_5625_3214_0085 0 On
03/10/24 EUXMSFSG78 SSD KBG40ZNS512G 30100_0090_0000_0000_8CE3_8E04_0157_C6FA 0 On
03/10/24 NMLWHQA98 SSD KBG40ZNS512G H0100_0020_0000_0000_8CE3_8E04_0121_7017 0 On
03/10/24 WOOFTYUV36 SSD kBG50ZNS512G Z0000_0030_0000_0000_8CE3_8E04_0389_1C04 0 On
03/10/24 SVDFKJSKF98 SSD HFM001TD3GX014N L0000_0070_0000_0010_0008_0D05_000D_8ACB 0 On
03/09/24 FHDFKJSKFJ5 SSD HFM001TD3GX013N 5ACE4_2E10_2567_E6A5_2EE4_AC00_0000_0001 0 On
03/09/24 EUXMSFSG78 SSD KBG40ZNS512G 30100_0090_0000_0000_8CE3_8E04_0157_C6FA 0 On
03/09/24 NMLWHQA98 SSD KBG40ZNS512G H0100_0020_0000_0000_8CE3_8E04_0121_7017 0 On
03/09/24 WOOFTYUV36 SSD kBG50ZNS512G Z0000_0030_0000_0000_8CE3_8E04_0389_1C04 0 On
03/09/24 SVDFKJSKF98 SSD HFM001TD3GX014N L0000_0070_0000_0010_0008_0D05_000D_8ACB 0 On
03/08/24 FHDFKJSKFJ5 SSD HFM001TD3GX013N 5ACE4_2E10_2567_E6A5_2EE4_AC00_0000_0001 0 On
03/08/24 EUXMSFSG78 SSD KBG40ZNS512G 30100_0090_0000_0000_8CE3_8E04_0157_C6FA 0 On
03/08/24 NMLWHQA98 SSD KBG40ZNS512G H0100_0020_0000_0000_8CE3_8E04_0121_7017 0 On
03/08/24 WOOFTYUV36 SSD kBG50ZNS512G Z0000_0030_0000_0000_8CE3_8E04_0389_1C04 0 On
03/08/24 SVDFKJSKF98 SSD HFM001TD3GX014N L0000_0070_0000_0010_0008_0D05_000D_8ACB 0 On
To compare column and find changes made in that column you can try with the below code. In first
summarization, it calculates the distinct count of serial numbers for each deviceDeviceIDand filter it by wheredistinctCountSerial > 1nowinnerjoin is performed on the DeviceID and the secondsummarizationis used for finding the maximumDatefor eachDeviceIDand it again performs ainnerjoin based onDateandDeviceIDto get the expected result.Click this link to check the query in Data Explorer.
Query I tried with:
Output: