johon
johon

Reputation: 65

Creating an Index Column for a Descriptive Data Using “DAX” in Power BI

I have a table Like this,

Table1

enter image description here

I want to create a column called as Row Number using DAX and not Query Editor (M).

So the Expected output is,

enter image description here

This can be done in M - Power Query Side.

But, I am looking for a solution using DAX- Calculated Column.

Additional source data

enter image description here

Upvotes: 1

Views: 2194

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40264

The RANKX function should work fine for this purpose.

Row Number = RANKX ( Table1, Table1[ColA] )

Recommended reading:

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns

Upvotes: 0

Related Questions