I am creating a BAQ where I want a column to be the Sheet#. Thus I would want to create a calculated field with code such as “SHEET.0” + Row#. It would be nvarchar. What function or system variable can I use to represent Row#?
I have done this with a calcualted fiedl in a BAQ. Somethign like this:
dense_rank() OVER(order by SortKey asc )
In this case, sortkey is a unique value for each row.
1 Like
Hi Nate,
Thanks for the response. This is what I have in the editor for the calculated field:
dense_rank() OVER(Order by SortKey Asc)
When I do a check syntax I get “Invalid column name ‘Sortkey’”.
Please advise.
Yes, in my BAQ sort key was a just a unique number for each row. If you have a unique field for each row, like a part number or order number, then put that in place of sortkey.
i was able to solve it using row_number() over (order by part.company asc)