Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Number of times a value previously repeats in a column, appears in another column in the same table.
Whatever is there in column unique response is checked and unique count is calculated .
Just as an example abc appears 3 times. unique count will be 1, 2 and 3 sequentially.
Unique Response | Unique Count |
abc | 1 |
xyz | 1 |
bce | 1 |
abc | 2 |
xye | 1 |
32d | 1 |
abc | 3 |
xyz | 2 |
Solved! Go to Solution.
Hi @trideepnath
You should add a index column for duplicate values in your table .
Then create a calculated column with COUNTROWS() to count duplicate values .
Column =
var _currentResponse='Table'[Unique Response]
var _currentIndex='Table'[Index]
return COUNTROWS(FILTER('Table','Table'[Index]<_currentIndex && 'Table'[Unique Response]=_currentResponse))+1
You will get a result like this :
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @trideepnath
You should add a index column for duplicate values in your table .
Then create a calculated column with COUNTROWS() to count duplicate values .
Column =
var _currentResponse='Table'[Unique Response]
var _currentIndex='Table'[Index]
return COUNTROWS(FILTER('Table','Table'[Index]<_currentIndex && 'Table'[Unique Response]=_currentResponse))+1
You will get a result like this :
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@trideepnath , First if all add an index column in power query
Power Query- Index Column: https://youtu.be/NS4esnCDqVw
Then in dax add a new column
countx(filter(Table, [Unique Response] = earlier([Unique Response]) && [index] <= earlier( [index] )) , [Index])
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |