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
I have a table below - And I need a calculated column that gives me the information for Code A, whether the Id already exists or not in code B
| ID | Code |
| 100 | A |
| 102 | A |
| 103 | A |
| 100 | B |
| 101 | B |
So the final table should look like this:
| ID | Code | Exist or Not? |
| 100 | A | Exist |
| 102 | A | New |
| 103 | A | New |
| 100 | B | |
| 101 | B |
Solved! Go to Solution.
X =
VAR _1 =
COUNTX (
FILTER ( Table, [ID] = EARLIER ( [ID] ) && [Code] < EARLIER ( [Code] ) ),
[ID]
) + 0
RETURN
IF ( _1 > 0, "Old", "New" )
X =
VAR _1 =
COUNTX (
FILTER ( Table, [ID] = EARLIER ( [ID] ) && [Code] < EARLIER ( [Code] ) ),
[ID]
) + 0
RETURN
IF ( _1 > 0, "Old", "New" )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |