Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

row number

Hello

I need row number for my table.I want it as a measure as my data model is Azure Analysis Services,I cant edit my data model.So I want a measure in report itself.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    As Ritaf1983 said, you can implement the creation of line numbers by MEASURE through the rankx function.


    The usual practice can be combined with the allselected function, which can be dynamically adjusted according to the slicer.

    result_ = SUM('Table'[Value])
    
    Index = RANKX(ALLSELECTED('Table'[Cate]),[result_])

     

    Best Regards,
    Adamk Kong

     

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

4 Replies

  • Hi Anonymous 
    You can add an index column with PQ:

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    No,I dont have access to use edit query mode.So I want that as a measure only.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    As Ritaf1983 said, you can implement the creation of line numbers by MEASURE through the rankx function.


    The usual practice can be combined with the allselected function, which can be dynamically adjusted according to the slicer.

    result_ = SUM('Table'[Value])
    
    Index = RANKX(ALLSELECTED('Table'[Cate]),[result_])

     

    Best Regards,
    Adamk Kong

     

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