Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jclorenzo
Frequent Visitor

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. 

jclorenzo_0-1605293103814.png

 

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

jclorenzo_2-1605293655388.png

Any suggestion would be greatly appreciated !!!

 

 

1 ACCEPTED SOLUTION

@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 )
    )

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

4 REPLIES 4
ChrisMendoza
Resident Rockstar
Resident Rockstar

@jclorenzo -

 

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

RETURN
    COUNTROWS(__temp)

 

image.png

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



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 ?

@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 )
    )

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Excellent; It worked perfectly.  Thanks !!!

jclorenzo_0-1605303790636.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.