Forum Discussion

Pbiuserr's avatar
Pbiuserr
Post Prodigy
4 years ago

Count rows visible in table

Hello,

I have a table and I would like to create a measure which will display number of rows displayed in the table (including all filters, slicers etc) 

Was thinking of COUNTROWS ( ALLSELECTED ( [Fact Table] ) ) but it doesnt really tell the correct number 

 

I have ID from fact table and rest of columns from referential tables

5 Replies

  • SpartaBI's avatar
    SpartaBI
    Community Champion

    Pbiuserr hey can you share a sample data and the explain the visual you want to create.

    • Pbiuserr's avatar
      Pbiuserr
      Post Prodigy

      Hey,

      Visual is already created (table). It's a drillthrough page, and table inside it (ID from fact table and bunch of dimensions associated from referential tables). I want to count all lines visible in the drillthrough. So if somebody drills on 2 rows, the count will be 2, if on 2000 the count will be 2000.

       

      Seems like COUNTROWS ( ALLSELECTED ( Fact Table) ) or COUNTROWS ( ALLSELECTED ( Fact Table[ID] ) ) will do the job but I am not entirely convinced if its most efficient way.Moreover I struggle to add this measure to the table, for some reason. If its normal table in the page then its fine but not in this drillthrough worksheet