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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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" )
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 55 | |
| 39 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 93 | |
| 85 | |
| 33 | |
| 31 | |
| 25 |