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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
AndyMeiks
Frequent Visitor

Card Showing Sum of Distinct Values

Hi team,

 

Hoping you can help with this - I've seen similar solutions for this but none that are quite perfect:

I'm wanting to display a basic Card visual that summarises the unique values in a column. I have sports data broken down by period, e.g. Quarter 1, and want to show a value for 'Total Time'. Because the total_period_time exists for each individual athlete, a simple sum doesn't work. 

 

Nameperiod_nametotal_period_time
AQuarter 110
BQuarter 110
CQuarter 110
AQuarter 212
BQuarter 212
CQuarter 212
AQuarter 38
BQuarter 38
AQuarter 410
CQuarter 410

 

So my expected value for the card would be 10 + 12 + 8 + 10. However - the additional complication:

I then want to be able this to be filterable by selecting different numbers of periods:

AndyMeiks_0-1705465145816.png

 

E.g. the expected value in the card would be 10 + 12. I considered filtering to only 1 athlete (e.g. A), however A won't always play every quarter nor every match.

 

How would I best achieve this? Open to any suggestions. Let me know if I can provide more info.

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @AndyMeiks ,

 

Try this:

sum =
SUMX (
    SUMMARIZE ( 'Table', 'Table'[period_name], 'Table'[total_period_time] ),
    [total_period_time]
)

danextian_0-1705467774875.png

danextian_1-1705467786115.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @AndyMeiks ,

 

Try this:

sum =
SUMX (
    SUMMARIZE ( 'Table', 'Table'[period_name], 'Table'[total_period_time] ),
    [total_period_time]
)

danextian_0-1705467774875.png

danextian_1-1705467786115.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Perfect, exactly what I wanted. Thankyou.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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