Forum Discussion

barragan82's avatar
barragan82
Helper II
1 year ago
Solved

Count Rows of a Visual Table

Hi all,

 

In the example below, I am trying to create a measure that counts the number of rows of this specific visual table, not of the rows of data in the table "behind the scenes." Specifically, I am trying to identify/count that we have a total of eight (8) for the EMAIL ADDRESS column. DISTINCTCOUNT gives me a result of 2 while COUNTROWS gives me a result of 11. I would appreciate any ideas. Thank you!

 

 

 

  • It looks like the number of rows is determined by unique combinations of EMAIL ADDRESS, ARTIFACT SUBMISSION, and COURSE.

     

    Assuming these are all columns of a single table named Table1, I'd expect something like this to work:

    COUNTROWS (
        SUMMARIZECOLUMNS (
            Table1[EMAIL ADDRESS],
            Table1[ARTIFACT SUBMISSION],
            Table1[COURSE]
        )
    )

     

  • Hi barragan82,

    Thank you for reaching out to the Microsoft fabric community forum. Thank you AlexisOlson  for your input on this issue. 
     
    After reviewing the details you provided, I was able to reproduce the scenario, I have used it as sample data on my end and implemented it.   

    Dax Measure:   

    Row Visual Count = 
    IF(
        ISINSCOPE('Instructors'[EMAIL ADDRESS]) && ISINSCOPE('Instructors'[COURSE]),
        1,
        COUNTROWS(
            SUMMARIZE(
                'Instructors',
                'Instructors'[EMAIL ADDRESS],
                'Instructors'[COURSE]
            )
        )
    )
    


    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly. 
     
    Thank you. 

7 Replies

  • It looks like the number of rows is determined by unique combinations of EMAIL ADDRESS, ARTIFACT SUBMISSION, and COURSE.

     

    Assuming these are all columns of a single table named Table1, I'd expect something like this to work:

    COUNTROWS (
        SUMMARIZECOLUMNS (
            Table1[EMAIL ADDRESS],
            Table1[ARTIFACT SUBMISSION],
            Table1[COURSE]
        )
    )

     

  • v-saisrao-msft's avatar
    v-saisrao-msft
    Community Support

    Hi barragan82,

    Thank you for reaching out to the Microsoft fabric community forum. Thank you AlexisOlson  for your input on this issue. 
     
    After reviewing the details you provided, I was able to reproduce the scenario, I have used it as sample data on my end and implemented it.   

    Dax Measure:   

    Row Visual Count = 
    IF(
        ISINSCOPE('Instructors'[EMAIL ADDRESS]) && ISINSCOPE('Instructors'[COURSE]),
        1,
        COUNTROWS(
            SUMMARIZE(
                'Instructors',
                'Instructors'[EMAIL ADDRESS],
                'Instructors'[COURSE]
            )
        )
    )
    


    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly. 
     
    Thank you. 

    • barragan82's avatar
      barragan82
      Helper II

      Thank you, this did exactly what I wanted it to.