Forum Discussion

jclorenzo's avatar
jclorenzo
Frequent Visitor
5 years ago
Solved

COUNTA Result While displaying original data.

We would like to display the total count in a table grid of the COUNTA (Counts the number of records that are not empty) result.  But maintain the original text.

 

Similar to the following screenshot. 

 

Power BI displays the count at the bottom but switches the detail values to the individual count.  In this case 1.

Any suggestion would be greatly appreciated !!!

 

 

  • jclorenzo -

    ConcatX =
    VAR __temp =
        CALCULATETABLE ( 'Table (2)', 'Table (2)'[Column2] <> BLANK () )
    RETURN
        IF (
            HASONEVALUE ( 'Table (2)'[Column1] ),
            CONCATENATEX ( 'Table (2)', 'Table (2)'[Column2], " | " ),
            COUNTROWS ( __temp )
        )
    

4 Replies

  • ChrisMendoza's avatar
    ChrisMendoza
    Icon for Resident Rockstar rankResident Rockstar

    jclorenzo -

     

    Measure = 
    VAR __temp = 
    CALCULATETABLE(
        'Table',
        'Table'[Priority] <> BLANK()
    )
    
    RETURN
        COUNTROWS(__temp)

     

    • jclorenzo's avatar
      jclorenzo
      Frequent Visitor

      Hi Chris,  thank you for your suggestion, but we need the count value at the bottom of the DONE column.  Identical to how Excel displays it.  Any suggestions ?

      • ChrisMendoza's avatar
        ChrisMendoza
        Icon for Resident Rockstar rankResident Rockstar

        jclorenzo -

        ConcatX =
        VAR __temp =
            CALCULATETABLE ( 'Table (2)', 'Table (2)'[Column2] <> BLANK () )
        RETURN
            IF (
                HASONEVALUE ( 'Table (2)'[Column1] ),
                CONCATENATEX ( 'Table (2)', 'Table (2)'[Column2], " | " ),
                COUNTROWS ( __temp )
            )