The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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:
Solved! Go to Solution.
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.
Thank you Tanushree_Kapse. Fantastic. Thank you again for your prompt response. It is appreciated.
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.
@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"}))
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |