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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

ALLEXCEPT with filter

Hi everyone,

 

I am calculating [Cost Total] that takes all values in [Cost in 000]. Below formula works but I want to also include [Organization] = "IND" and "COO"

 

Cost Total = CALCULATE(SUM('Details Actuals+FC (Selection)'[Cost in 000]), ALLEXCEPT('Details Actuals+FC (Selection)', 'Details Actuals+FC (Selection)'[Project Name], 'Details Actuals+FC (Selection)'[Year], 'Details Actuals+FC (Selection)'[Element Category]))

 

Project NameYearElement CategoryOrganisationMonthDateCost TotalCost in 000
AAA2023Cash OutIND1201/Dec/236.462.000 kr.156.000, kr.
AAA2023Cash OutIND1101/Nov/236.462.000 kr.158.000, kr.
AAA2023Cash OutIND1001/Oct/236.462.000 kr.200.000, kr.
AAA2023Cash OutIND901/Sep/236.462.000 kr.200.000, kr.
AAA2023Cash OutIND801/Aug/236.462.000 kr.200.000, kr.
AAA2023Cash OutIND701/Jul/236.462.000 kr.200.000, kr.
AAA2023Cash OutIND601/Jun/236.462.000 kr.158.000, kr.
AAA2023Cash OutIND501/May/236.462.000 kr.158.000, kr.
AAA2023Cash OutIND401/Apr/236.462.000 kr.158.000, kr.
AAA2023Cash OutIND301/Mar/236.462.000 kr.158.000, kr.
AAA2023Cash OutIND201/Feb/236.462.000 kr.158.000, kr.
AAA2023Cash OutIND101/Jan/236.462.000 kr.158.000, kr.
AAA2023Cash OutIND1201/Dec/236.462.000 kr.500.000, kr.
AAA2023Cash OutIND1201/Dec/236.462.000 kr.400.000, kr.
AAA2023Cash OutIND1101/Nov/236.462.000 kr.200.000, kr.
AAA2023Cash OutIND1001/Oct/236.462.000 kr.300.000, kr.
AAA2023Cash OutIND901/Sep/236.462.000 kr.500.000, kr.
AAA2023Cash OutIND801/Aug/236.462.000 kr.300.000, kr.
AAA2023Cash OutIND701/Jul/236.462.000 kr.100.000, kr.
AAA2023Cash OutIND601/Jun/236.462.000 kr.100.000, kr.
AAA2023Cash OutIND501/May/236.462.000 kr.200.000, kr.
AAA2023Cash OutIND301/Mar/236.462.000 kr.200.000, kr.
AAA2023Cash OutCOO1101/Nov/236.462.000 kr.200.000, kr.
AAA2023Cash OutCOO901/Sep/236.462.000 kr.200.000, kr.
AAA2023Cash OutCOO601/Jun/236.462.000 kr.200.000, kr.
AAA2023Cash OutCOO601/Jun/236.462.000 kr.100.000, kr.
AAA2023Cash OutCOO501/May/236.462.000 kr.100.000, kr.
AAA2023Cash OutCOO401/Apr/236.462.000 kr.200.000, kr.
AAA2023Cash OutCOO401/Apr/236.462.000 kr.100.000, kr.
AAA2023Cash OutCOO301/Mar/236.462.000 kr.100.000, kr.
AAA2023Cash OutCOO201/Feb/236.462.000 kr.200.000, kr.
AAA2023Cash OutCOO201/Feb/236.462.000 kr.100.000, kr.
AAA2023Cash OutCOO101/Jan/236.462.000 kr.100.000, kr.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

You can try to use the following measure formula if it suitable for your requirement:

Cost Total =
CALCULATE (
    SUM ( 'Details Actuals+FC (Selection)'[Cost in 000] ),
    FILTER (
        ALLSELECTED ( 'Details Actuals+FC (Selection)' ),
        'Details Actuals+FC (Selection)'[Organization] IN { "IND", "COO" }
    ),
    VALUES ( 'Details Actuals+FC (Selection)'[Project Name] ),
    VALUES ( 'Details Actuals+FC (Selection)'[Year] ),
    VALUES ( 'Details Actuals+FC (Selection)'[Element Category] )
)

Regards,

Xiaoxin sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

You can try to use the following measure formula if it suitable for your requirement:

Cost Total =
CALCULATE (
    SUM ( 'Details Actuals+FC (Selection)'[Cost in 000] ),
    FILTER (
        ALLSELECTED ( 'Details Actuals+FC (Selection)' ),
        'Details Actuals+FC (Selection)'[Organization] IN { "IND", "COO" }
    ),
    VALUES ( 'Details Actuals+FC (Selection)'[Project Name] ),
    VALUES ( 'Details Actuals+FC (Selection)'[Year] ),
    VALUES ( 'Details Actuals+FC (Selection)'[Element Category] )
)

Regards,

Xiaoxin sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.