Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

Count the Number of Rows in a Matrix

  • 1.  Count the Number of Rows in a Matrix

    Bronze Contributor
    Posted Nov 08, 2019 02:29 PM
    I'm sorry if I missed this in the Forum but I can't seem to find a solution.
      I have a Matrix Visual that can be large or small depending on the selected slicers.  There are over 10 million rows of raw data.  I would like to let a user know, via a card, how many rows are contained in the matrix.
      I have 3 items in the "Rows" section of the matrix :
    Below is a sample of the matrix visual:

    Any help would be greatly appreciated!

    Clark Bethancourt

  • 2.  RE: Count the Number of Rows in a Matrix

    Top Contributor
    Posted Nov 08, 2019 03:04 PM
    What have you tried?
    This should be pretty straight-forward unless there is something about your model that we don't know.

    You need to create a measure that counts one of the columns used in Rows. VPN or Description would probably be your best bet.

    The slicer selections will filter the list of VPNs in the matrix.
    The measure will count the filtered list.

    Audrey Abbey
    SR. BI Developer/Analyst
    Portland OR


  • 3.  RE: Count the Number of Rows in a Matrix

    Posted Nov 11, 2019 12:53 PM
    Hi Clark, you can also add an index that assigns a row number to each row immediately after extract.  Each number is unique, so you could utilize that unique number for your 'count'. I use it to keep my BOM parent/child breakouts in proper sequence during indentation.

    Nancy Wilson
    Sr. MIS Specialist/Analyst/Programmer
    Blanchester OH