Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I would like to place a running count column on a table visual, that has a value starting from 1 on the first row and incrementing by 1 for each following row. I know I can do this based on a column. Here's my measure based on the LastName column where SLR is the table name:
Solved! Go to Solution.
Hi @Anonymous ,
I don't think what you're trying to achieve is possible. For a sequence to work, it must reference a column and changing the order of rows in such a column would result to your sequence changing as well.
Proud to be a Super User!
@Anonymous
UIse this measure:
RC =
COUNTROWS(
WINDOW(
0,ABS,
0,REL,
SUMMARIZE( ALLSELECTED( 'SLR' ) , 'SLR'[LasName] ),
ORDERBY( 'SLR'[LasName] , ASC )
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi Fowmy, it works only if the LastName column is sorted in ascending order. If I sort on the same column, but with descending order, then the first row's running count does not start from 1 but instead is the value that is the maximum row count. And if I sort on a different column, then the row count is not in sequential order, either ascending or descending.
Thanks, Mike.
Hi @Anonymous ,
Please post a usable sample data (not an image) and your expected result from that.
Proud to be a Super User!
Hi Danextian,
Here's the data:
PlayerId | LastName | FirstName | CountryDescription |
11 | Smit | Hans | USA |
20 | Powers | Jes | USA |
33 | Smithy | Ellen | Mexico |
40 | Valon | Deborah | Mongolia |
50 | Palmers | Janice | USA |
119 | Taddy | Dwight | USA |
And here is the visual:
The data was not sorted. Note, I don't care if it is sorted or not, but I want the Running Count row to be in ascending sequential order, starting from one. That regardless of the sort or filter. Thanks.
Hi @Anonymous ,
I don't think what you're trying to achieve is possible. For a sequence to work, it must reference a column and changing the order of rows in such a column would result to your sequence changing as well.
Proud to be a Super User!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
83 | |
82 | |
67 | |
49 |
User | Count |
---|---|
135 | |
111 | |
100 | |
65 | |
62 |