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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lorenz0210
Helper I
Helper I

How to Calculate Sum from a Revenue column and being filter by another column

Hi everyone, 

 

I am trying to do a break out of the revenue using different columns and filter. I am trying to seperate the revenue between region hunting and farming. 

 

lorenz0210_0-1707247169023.png

 

 Here is the dax I created: 

 

Regional Account Hunting =
CALCULATE(SUM('2024 - Sales Performance (S+V)'[Finance Projection 2024 (Split) (converted).amount]),
    Filter('2024 - Sales Performance (S+V)',
        '2024 - Sales Performance (S+V)'[Regional Account Flag]="EMEA" ||
        '2024 - Sales Performance (S+V)'[Regional Account Flag]="US Market"
        && '2024 - Sales Performance (S+V)'[User TP Selling Role] IN {"Hunting"}
    )
)

 

For some reason it is not working and not calculating correctly. 

 

Hoping someone can help.

 

Appreciate much. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lorenz0210 

You can try the following measure

 

Regional Account Hunting =
CALCULATE (
    SUM ( '2024 - Sales Performance (S+V)'[Finance Projection 2024 (Split) (converted).amount] ),
    FILTER (
        '2024 - Sales Performance (S+V)',
        '2024 - Sales Performance (S+V)'[Regional Account Flag]
            IN { "EMEA", "US Market" }
                && '2024 - Sales Performance (S+V)'[User TP Selling Role] IN { "Hunting" }
    )
)

 

 

Best Regards!

Yolo Zhu

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

7 REPLIES 7
lorenz0210
Helper I
Helper I

Hello everyone again, 

 

I tried this dax just to make sure numbers are calculating correctly: 

Regional Account_US Market =
    CALCULATE(SUM('2024 - Sales Performance (S+V)'[Finance Projection 2024 (Split) (converted).amount]),
    Filter('2024 - Sales Performance (S+V)',
        '2024 - Sales Performance (S+V)'[User TP Selling Role]="Hunting" &&
        '2024 - Sales Performance (S+V)'[Regional Account Flag]="US Market"
    ))
 
However the challenge is the dax on how to add the revenue for "EMEA" that is still within the "User TP Selling Role"- "Hunting". 
lorenz0210_0-1707256910435.png

 

Kaviraj11
Super User
Super User

You can use Matrix Visuals, keep region in Rows, keep selling roles in columns and finance projection in values. 

you can filter out the region and selling roles that you don't want in the filter pane

 

 




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

Proud to be a Super User!





Kaviraj11
Super User
Super User

Can you share the pbix file and expected output?




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

Proud to be a Super User!





Here is the expected output: 

 

lorenz0210_0-1707254195273.png

 

Anonymous
Not applicable

Hi @lorenz0210 

You can try the following measure

 

Regional Account Hunting =
CALCULATE (
    SUM ( '2024 - Sales Performance (S+V)'[Finance Projection 2024 (Split) (converted).amount] ),
    FILTER (
        '2024 - Sales Performance (S+V)',
        '2024 - Sales Performance (S+V)'[Regional Account Flag]
            IN { "EMEA", "US Market" }
                && '2024 - Sales Performance (S+V)'[User TP Selling Role] IN { "Hunting" }
    )
)

 

 

Best Regards!

Yolo Zhu

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

 

Hi Yolo,

 

Thank you. The dax works. Although one more dax I am trying to solve: 

Is there a simple way to fix this: 

 

Hunting S+V =
    CALCULATE(SUM('2024 - Sales Performance (S+V)'[Finance Projection 2024 (Split) (converted).amount]),
    Filter('2024 - Sales Performance (S+V)',
        '2024 - Sales Performance (S+V)'[User TP Selling Role]="Hunting" &&
        '2024 - Sales Performance (S+V)'[Regional Account Flag]<>"EMEA" &&
        '2024 - Sales Performance (S+V)'[Regional Account Flag]<>"US Market" &&
        '2024 - Sales Performance (S+V)'[Global Account Flag]<>"AMERICAS;" &&
        '2024 - Sales Performance (S+V)'[Global Account Flag]<>"EUROPE & APAC;"
    ))
Anonymous
Not applicable

Hi @lorenz0210 

You can try the following measure.

Hunting S+V =
CALCULATE (
    SUM ( '2024 - Sales Performance (S+V)'[Finance Projection 2024 (Split) (converted).amount] ),
    FILTER (
        '2024 - Sales Performance (S+V)',
        '2024 - Sales Performance (S+V)'[User TP Selling Role] = "Hunting"
            && NOT ( '2024 - Sales Performance (S+V)'[Regional Account Flag]
            IN { "EMEA", "US Market", "AMERICAS", "EUROPE & APAC" } )
    )
)

Best Regards!

Yolo Zhu

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

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors