DAX formula to combine two criteria and output as one

royr001

New Member
Joined
Jul 23, 2018
Messages
2
Hello

I'd like to incorporate a dax formula or other dynamic function into my power pivot to have an additional criteria added which is the sum of two other criteria.

Here is a snapshot of a basic power pivot example of my workbook. I have 4 categories and I want a 5th category in the pivot table which is the sum of Revenue and Support (boxed in red).

TycuEPw.jpg
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Tricky. I think you could create another table with the 5 groups and account numbers. It would be identical to the reference table you have, but contain 2 extra rows, the 100 and 400 rows are repeated with “group” = Rev + Support.

Join in the new table to the existing reference table.

Write a measure = CALCULATE(sum(data[amount]),NewTableName)

place the group column from the new table in the pivot columns (replace the current group from ref table).
place the new measure in values.

It will work, guaranteed. ��
 
Upvote 0
Hi royr

in addition to what Matt suggested, I wanted to add that what you are trying to do can be solved with a many to many pattern by constructing the below model:

kWebJsP.png



And then using this measure:

Code:
=CALCULATE(
    SUM( Sales[Amount] ),
    CROSSFILTER( AccountsGroups[Acc_Num], Accounts[Acc_Num], Both )
)


IFIRk4H.png
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,329
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top