The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |