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
bklyn3
Advocate II
Advocate II

Total Row -Very simple stuff but I am struggling.

Hello

 

I have a Matrix in powerBI desktop. . I would like the total row to show the count. 

 

DateStuff
1/1ABC
1/2ABC
2/1 
2/3ABC
Total3

 

How do I do that ? 

Somehow it keeps showing ABC

 

Thank you

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @bklyn3 

 

Try this measure:

Stuff Measure =
IF (
    HASONEVALUE ( 'Table'[Stuff] ),
    MAX ( 'Table'[Stuff] ),
    CALCULATE (
        COUNTA ( 'Table'[Stuff] ),
        REMOVEFILTERS ( 'Table'[Date] ),
        'Table'[Stuff] <> BLANK ()
    )
)

 

output:

VahidDM_0-1654208293132.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 FIFA World Cup - Medal Records 

View solution in original post

2 REPLIES 2
bklyn3
Advocate II
Advocate II

Hello VahidDM,

 

I tried to create a measure using the formula you suggested. Then use that measure in a matrix in the "Values" field and turned on the "Row Subtotals" but I still get "ABC" for the total :(. What am i missing ? 
would you mind sharing the .pbix you used above

 

Thanks for your help.

 

 

VahidDM
Super User
Super User

Hi @bklyn3 

 

Try this measure:

Stuff Measure =
IF (
    HASONEVALUE ( 'Table'[Stuff] ),
    MAX ( 'Table'[Stuff] ),
    CALCULATE (
        COUNTA ( 'Table'[Stuff] ),
        REMOVEFILTERS ( 'Table'[Date] ),
        'Table'[Stuff] <> BLANK ()
    )
)

 

output:

VahidDM_0-1654208293132.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 FIFA World Cup - Medal Records 

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.