Search code examples
daxtabular

count rows for all tables in analysis service tabular (dax)


I found a query doing that before but can't find it again. It's something producing

table    count
table_A  xxxx
table_B  xxx
table_C  xxx

Please help. Thanks-


Solution

  • I don't know what you saw before, but something like this will produce what you're looking for. Run it against your tabular instance.

    SELECT CUBE_NAME
        , DIMENSION_CAPTION AS TableName
        , DIMENSION_CARDINALITY AS RowCount
      FROM $system.MDSchema_Dimensions
      ORDER BY DIMENSION_CARDINALITY DESC