Powerpivot value separation depending on criteria

Henceman

New Member
Joined
Oct 9, 2017
Messages
46
I have two tables, a data table and a lookup table.

Data table

AccountPGValue
EFG3323321540100
EFG3323321840100
HER44122156010

Lookup table

AccountCorporate or PG
EFG332332Corprorate
HER44122PG


Pivot I need, would create the result roughly like that

AccountPGValue
EFG332332200
HER44122156010


As you see, PG for first line item would be left empty, since it is not required to be shown in the pivot (forbidden actually), so if there are multiple PGs on same account, then pivot would simply need to summarize the values, but if lookup table states the data needs a "PG" level, the pivot would need to pick up the data from the data table and populate the pivot as well.

And it all needs to happen in the same column, so some of the accounts would feature empty cells for PG and some have the data.

I hope my explanation was understandable and doable :)

Thanks.

H.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Yes, it’s doable. Put account and Corporate or PG columns on rows in the pivot, set it to a tabular layout, and write a measure that returns a value only for PG, something like

CALCULATE(SUM(DATATABLE[value]),keepfilters(lookuptable[corp or pg]=“PG”))
 
Upvote 0
This looks promising! If my lookup table features more criteria, like some accounts are related to Balance sheet and sign needs to be reversed? This time the criteria would need to alternate, so if first account is mapped as balance sheet, then value would need to be negative and if PL- positive.
 
Upvote 0

Forum statistics

Threads
1,223,744
Messages
6,174,253
Members
452,553
Latest member
red83

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