Forum Discussion
andrewkla
5 years agoFrequent Visitor
Calculated column to flag first occurences only
I've got a column with repetitive ID's and I'm trying to get a calculated column to flag first entries (or any as long as it's one flag only per group of ID's), with the remaining rows being flagged ...
- 5 years ago
andrewkla , Add and index column in power query and then add a new column in Dax
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
new column =
var _min =minx(filter(Table, [ID] = earlier([ID])),[Index])
return
if ([Index] = _min , 1, , blank())
andrewkla
5 years agoFrequent Visitor
Thank you, this worked like a charm! (There's an unnecessary comma in the last line). Thanks for this!