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
Anonymous
Not applicable

Summing expenses for only 2 items in a column

Hi 

 

I am only new to Power BI and I need the sum of only 2 items in my table. E.g., I have a list of the following items with the expense next to them. All items are in the table for each month.  

 

Cost of Sales      Cost of Sales expense

Training hire           80000

Resources               20000

Wages                    90000

venue hire             10000

 

I only want to calculate the sum of all Training hire and resources. I need to do a filter on my cost of sales column and the expenses together. I know it is easy but I am having difficulties getting in correct.

 

I have used:

Cost of 2 items = CALCULATE(sum('Cost of Sales'[Cost of Sales Expense]),('Cost of Sales'[Cost of Sales]="Training - Resources & Printing"),('Cost of Sales'[Cost of Sales]="Training - Venue Hire"))
 
but it isn't bringing anything up. It works when I just use the one filter so I am guessing I am adding the second filter incorrectly but I am not sure how to add it this dax. 
 
Any assistance would be appreciated. 
Thank you. 
1 ACCEPTED SOLUTION
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

Use the below DAX:

Cost of 2 items = CALCULATE(SUM('Cost of Sales'[Cost of Sales Expense]), FILTER('Cost of Sales','Cost of Sales'[Cost of Sales]="Training - Resources & Printing" || 'Cost of Sales'[Cost of Sales]="Training - Venue Hire"))

 

I hope this helps!
Mark it as a solution if it answers your question. Kudos are always appreciated!

Thanks.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you Tanushree_Kapse.  Fantastic. Thank you again for your prompt response. It is appreciated. 

Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

Use the below DAX:

Cost of 2 items = CALCULATE(SUM('Cost of Sales'[Cost of Sales Expense]), FILTER('Cost of Sales','Cost of Sales'[Cost of Sales]="Training - Resources & Printing" || 'Cost of Sales'[Cost of Sales]="Training - Venue Hire"))

 

I hope this helps!
Mark it as a solution if it answers your question. Kudos are always appreciated!

Thanks.

amitchandak
Super User
Super User

@Anonymous , Try like

 

Cost of 2 items = CALCULATE(sum('Cost of Sales'[Cost of Sales Expense]), filter('Cost of Sales', 'Cost of Sales'[Cost of Sales] in {"Training - Resources & Printing","Training - Venue Hire"}))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak . Appreciate your prompt reply. Thank you. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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