Forum Discussion
wiktorius1984
5 years agoRegular Visitor
count if
Hi, I would like to get the effect as below, the value is calculated based on the two id's from the first two columns. id second_id count a 1 1 a 1 2 a 1 3 a 2 1 b 1 1 ...
- 5 years ago
add an index column in power query https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-biThen try a new column in dax
count = countx(filter(Table, [id] =earlier([id]) && [second_id] =earlier([second_id]) && [index] <= earlier([index]) ),[index])
amitchandak
5 years agoSuper User
add an index column in power query https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
Then try a new column in dax
count = countx(filter(Table, [id] =earlier([id]) && [second_id] =earlier([second_id]) && [index] <= earlier([index]) ),[index])