Forum Discussion
IP Address Compare and Categorize
- 4 years ago
My bad I don't see you have IP on 2 columns
old_new = var searchIP = LOOKUPVALUE('Table'[prev],'Table'[prev],'Table'[current]) return IF( searchIP = BLANK(), "new","old")The result
Unfortunately I can't share a screenshot but it's basically this:
Column 1: 2021-12_IPs
Column 2: 2021-12_DNS
Column 3: 2022-01_IPs
Column 4: 2022-01_DNS
Column 5: Desired Output
Column 1 has the IP Addresses for the previous month, so:
1.2.3.4
1.2.3.5
1.2.3.6
Column 3 has new IP Addresses from the current month along with some constants from the previous month:
1.2.3.4
1.2.3.6
1.2.3.9
Columns 2 and 4 have data not exactly relevant to what I'm trying to accomplish in Column 5.
With Power Query, create a merge in the same table with IP & DATE criteria
With DAX, create a calculated column to compare the date IP where IP match :
CALCULATE ( MAX ( DATE), filter( TABLE, [IP] = EARLIER([IP]) )
- austinjgreer4 years agoFrequent Visitor
I apologize, would you be able to show me an example with a screenshot? I'm having a hard time understanding. Still pretty new to this! Thank you for your response.
- freginier4 years agoSolution Sage
My bad I don't see you have IP on 2 columns
old_new = var searchIP = LOOKUPVALUE('Table'[prev],'Table'[prev],'Table'[current]) return IF( searchIP = BLANK(), "new","old")The result
- austinjgreer4 years agoFrequent Visitor
Awesome! This did exactly what I needed. Thank you so much!