Change Dax Formula or Fields in Power Pivot

Defumator

New Member
Joined
Mar 14, 2012
Messages
13
Hello, everyone.

I have a base with data from different years, months, counts, real or budget, etc... And i am making a Profit and Loss Pivot table in Power Pivot.

On the row fieds, i have the different counts and sub counts.

In the column field, i have Calculate Fields with Dax. But i need to change them every month. For example, in feb, i have the calculated fields "Real Feb/17", "Real Feb/16", "Budget Feb/17",
"Budget Feb/17", YTD Real Feb/17",YTD Budget Feb/17". In March, i have to change everyone one of them.

I am currently using excel 2013, what options do i have? I was thinking VBA, but i cant create measures in excel 2013 with VBA.


Thank you!

 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
If i understand what you want, you don't need (or want) to use VBA. That is what filters/slicers are for. You write just 6 measures and change the filter context to show the data you need.
 
Upvote 0
Yes, but i still ll have problems.

For example, if i put the months field in a slicer or filter by month. And i select "Mar", i wont have the YTD, just the month value. And if i select "jan", "fev" and "mar", i ll have the accumulated for the 3 months. I want to show the month value and the accumulated value.
 
Upvote 0
Real Amount := SUM ( RealTable[Amount])

Budget Amount := SUM ( BudgetTable[Amount] ) or SUM( RealTable[BudgetAmount] )

Real Prior Year := CALCULATE ( [Real Amount], SAMEPERIODLASTYEAR(Calendar[Date] ) )

Budget Prior Year :=
CALCULATE ( [Budget Amount], SAMEPERIODLASTYEAR(Calendar[Date] ) )

YTD Real := TOTALYTD ( [Real Amount], Calendar[Date] )

YTD Budget := TOTALYTD ( [Budget Amount], Calendar[Date] )

So then just need to add some slicers to select the period you want.

 
Upvote 0

Forum statistics

Threads
1,223,963
Messages
6,175,656
Members
452,664
Latest member
alpserbetli

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