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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous_KH
Frequent Visitor

Sum of Trophies by 2 Particular Country

Greetings all,

 

I'm new to Power BI/Dax in general so apologize if this might seems obvoious but I couldn't manage to find a way to do it.

 

i want DAX FUNCTION to caluclate measure of sum of trophies won by australia and africa combined ,

i want to display it in card visualization.

 

countries trophy.png

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous_KH ,

According to your description, here's my solution. Create a measure.

Measure =
IF (
    "AFRICA"
        IN VALUES ( 'Table'[COUNTRY] )
            || "AUSTRALIA" IN VALUES ( 'Table'[COUNTRY] ),
    SUMX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[COUNTRY] IN { "AFRICA", "AUSTRALIA" }
        ),
        'Table'[TROPHIES WON]
    )
)

Get the correct result.

vkalyjmsft_0-1663132894417.png

vkalyjmsft_1-1663132906542.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous_KH ,

According to your description, here's my solution. Create a measure.

Measure =
IF (
    "AFRICA"
        IN VALUES ( 'Table'[COUNTRY] )
            || "AUSTRALIA" IN VALUES ( 'Table'[COUNTRY] ),
    SUMX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[COUNTRY] IN { "AFRICA", "AUSTRALIA" }
        ),
        'Table'[TROPHIES WON]
    )
)

Get the correct result.

vkalyjmsft_0-1663132894417.png

vkalyjmsft_1-1663132906542.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

Write this measure

Measure1 = calculate(sum(Data[Trophies won]),Data[Country]="Australia"||Date[Country]="Africa")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ddpl
Solution Sage
Solution Sage

@Anonymous_KH , Create a measure like below and put it in a card, You'll get your result...

 

Trophies Total= CALCULATESUM('Table'[TROPHIES WON]), 'Table'[COUNTRY] in {"AUSTRALIA""AFRICA"} )

i want to return a measure that ignoring any filters that might have been applied. for example if i click other country in my slicer panel , thic measure automatically showing blank

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors