Forum Discussion

larabraghetti's avatar
larabraghetti
Icon for Helper II rankHelper II
6 years ago
Solved

How to create a meaure that count each rows in a visual table

Hi All,

 

I have a table called 'Università' and I created two distinct visual tables filtered in different way.

See the example here below:

As you can see, I can't use the "index" column in the query editor because in the first table I will obtain some count jumps.

Please, could you help me to build a measure that create a correct counter rows?
Thank you very much!
Lara 

  • Hi larabraghetti ,

     

    Try measure like this:

    Measure 2 = RANKX(ALLSELECTED('Table'),'Table'[Indice],MAX('Table'[Indice]),ASC,Dense)


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

4 Replies

    • larabraghetti's avatar
      larabraghetti
      Icon for Helper II rankHelper II

      I don't need to count the rows but a progressive number of rows... 

      • larabraghetti's avatar
        larabraghetti
        Icon for Helper II rankHelper II

        I need a simple counter like 1,2,3,4,5,6....n

        Is it possible with a measure?

  • V-lianl-msft's avatar
    V-lianl-msft
    Icon for Community Support rankCommunity Support

    Hi larabraghetti ,

     

    Try measure like this:

    Measure 2 = RANKX(ALLSELECTED('Table'),'Table'[Indice],MAX('Table'[Indice]),ASC,Dense)


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