Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
Would somebody please be able to help me with a calculated column to check in a fact table, if two columns are the same then 1, but if they have already existed once then 0 like in the image below in the output column.
Deleting duplicates can't happen as these are rows of data with more columns.
Row 1 | Row 2 | Output |
1 | 1 | 1 |
2 | 2 | 1 |
2 | 2 | 0 |
3 | 3 | 1 |
2 | 2 | 0 |
Thanks
Liam
Solved! Go to Solution.
You would need an Index column for that to define "before". If you had that you could do this:
Column =
VAR __Table = FILTER('Table',[Row 1] = EARLIER([Row 1]) && [Row 2] = EARLIER([Row 2]) && [Index] < EARLIER([Index])
RETURN
IF(COUNTROWS(__Table) > 0,0,1)
You would need an Index column for that to define "before". If you had that you could do this:
Column =
VAR __Table = FILTER('Table',[Row 1] = EARLIER([Row 1]) && [Row 2] = EARLIER([Row 2]) && [Index] < EARLIER([Index])
RETURN
IF(COUNTROWS(__Table) > 0,0,1)
Hi @Greg_Deckler ,
Thankyou for your reply! The formula says the syntax for RETURN in incorrect currently
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |