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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi everyone, are you guys doing well?
I have a complicated challenge here to add a new column to my table,
Basically, I need to count duplicate ID's, and after that, I need to write "1" into one of the X rows that are duplicates,
For example, as in my table below, the ID "X1" repeats 4 times, then I need to write "1" as result into any row, and "0" for the remaining ones,
I have tried to use the expressions Countrows with Earlier function, but It will always give me just the repetition count,
Solved! Go to Solution.
@Anonymous
Please try
Expected Result =
IF (
'Table'[Date]
= CALCULATE ( MIN ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) ),
1,
0
)
Hi @Anonymous
Do you have a date or index column?
Hi tamerj1,
Yes, I have a column date, but the column index no,
@Anonymous
Please try
Expected Result =
IF (
'Table'[Date]
= CALCULATE ( MIN ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) ),
1,
0
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.