number row in slice

Is it possible to number the rows in a filtered slice starting from 1?

0 8 186
8 REPLIES 8

Good question, but I don't think so.

Maybe @Steve has more info about it

I am hoping that by doing this I can create a simple page numbering on my pdf output. Basically my rows never exceeds 1 page so I have put a page break in and if I can get it to number the rows then a can use this as the page number ๐Ÿ™‚

If that makes any sense

Steve
Platinum 4
Platinum 4

Not possible.

Isn't it true that this would work, though it might not be very efficient?

COUNT(SELECT(MyTable[KeyColumn], [_RowNumber] <= [_THISROW].[_RowNumber]))

FWIW: I have indeed used that technique to number rows using an "Index" (virtual) column, and encountered performance issues when it involved several thousand rows. Potentially, this column wasn't an absolute problem per se, but it indeed was enough to tip an automation's execution time over the timeout limit. Consider limiting its use (e.g., via CONTEXT) to where you need it (e.g., for display in a specific view).

Actually, @dbaum , I think I got the expression from you.  Thanks! ๐Ÿ™‚ And sorry for not acknowledging that in my post. ๐Ÿ˜ž

While I don't recall that, it's possible. And, attribution is not necessary, but your comment is a great reminder that we all learn a lot from each other in this community.

Steve
Platinum 4
Platinum 4

@Kirk_Masden wrote:

Isn't it true that this would work, though it might not be very efficient?


True indeed!

Top Labels in this Space