Forum Discussion

dokat's avatar
dokat
Post Prodigy
3 years ago

Creating index column to count rows

Hi I have a .pbix file from direct query data feeds from axure server.

I created a report using four tables that are linked in the back end.

 

The name of the tables are  Activity Status, Group, Families, Division. 

I created measures like Revenue, Units ie under Activity Status table and bring different atttributes from other 3 tables. How can i create index measure and calculate number of rows in the report?

 

Thanks

10 Replies

    • dokat's avatar
      dokat
      Post Prodigy

      AbhinavJoshi Thank you for your response. I am connected to the server via direct query to pull the data.I dont have access or visibility to query editor.  Is there a measure i can use, rankx didnt work for me because data is coming from 4 different tables, not from same table.

       

      Thanks

      • AbhinavJoshi's avatar
        AbhinavJoshi
        Responsive Resident

        Hi, I see the situation now. Create a new column in DAX, and enter this formula 

        Index =
            COUNTROWS(
                FILTER(
                    ALL('TableName'),
                    'TableName'[UniqueKey] <= EARLIER('TableName'[UniqueKey])
                )
            )