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 Experts,
I need to flag the first occurrence of duplicate values in the column using calculated column.
Example:
Please help me on this. I need a calculated column dax not a measure.
Regards.,
Swamy
Solved! Go to Solution.
Hi @Anonymous
Thanks for reaching out to us.
If you want to get the first occurrence, there should be a sequential column(time or numbers, etc. that can represent the sequence) in the table.
For example,
Flag =
var _index= CALCULATE(MIN('Table'[Index]),ALLEXCEPT('Table','Table'[Business],'Table'[Year],'Table'[Period]))
return IF('Table'[Index]= _index,1,0)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Thanks for reaching out to us.
If you want to get the first occurrence, there should be a sequential column(time or numbers, etc. that can represent the sequence) in the table.
For example,
Flag =
var _index= CALCULATE(MIN('Table'[Index]),ALLEXCEPT('Table','Table'[Business],'Table'[Year],'Table'[Period]))
return IF('Table'[Index]= _index,1,0)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi Experts,
Any idea on the above query?
Regards.,
Swamy
Hi,
I can do this in the Query Editor (not in the Data Model with a calculated column). If you are interested, post back and i can share an M language solution.
Also, since all entries in the first 3 rows are the same, how does one decide which should be the first record? Is this data incomplete?
Based on the Business, Year, Period and Cost center we need to flag it.
Regards.,
Swamy
Your response does not answer my question.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.