Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |