Read pivot column filter and use switch to get right formula

Swayzy

Board Regular
Joined
Mar 30, 2018
Messages
78
Hi

So I am a bit stumped by this, I have a table that contains budget and actuals values but I also want to have budget - actuals and budget / actuals calculated in my pivot.

The layout should be like this with account on rows and Q1 to Q4 as first column context and the four measures as second coloumn context
____________________________________________________________________________Q1______________________________________Q2 etc
Account Budget Actuals Budget - Actuals Budget / Actuals
4000



How can I write in a measure to read the second column context and use that in an If "column context" = Budget then use this "formula" etc for all four measures? I am pretty new to DAX so I am not super familiar with how I go about reading the actual pivot contexts/filters etc.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I'm not quite clear on what you want your output to look like. Do you want all 4 measures to appear for each quarter and each account? You should be able to mock something up in Excel and paste it in here as a table.

Q1Q2
AcctBudActBud-ActBud/ActBudActBud-ActBud/Act
4000​
4002​
4003​
etc

You'll need to create each of the 4 measures in DAX. You will also want a date table with your Q1...Q4 dates to use as a column header. Once you have those it's just a question of rearranging the table to suit your layout needs.
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,945
Members
449,275
Latest member
jacob_mcbride

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