Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Index in DAX

Hi All,

 

I want a dynamic DAX that can show me sequential numbers for all my records in table KPI.

The table can be filtered using slicers and so the index should change dynamically.

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

    You can try the following measure to show the dynamic index.

    RowNum = 
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[ID]  <= MAX ( 'Table'[ID]  )
        )
    )

     

    You can check more details from here.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies