Power Pivot - Customer numbers by quarter

jon999

New Member
Joined
Aug 24, 2015
Messages
37
Hi

I have a table that looks like this

TypeJanFebMarApr
Opening customers100110135160
New20503015
Churn-10-25-5-20
Closing customers110135160155

I am trying to work out the DAX formula to be able to select a month (via a slicer) that will give me the quarter view.

For example, select Feb and get the following:

Opening customers 100 (being Jan)
New 70 (being Jan + Feb)
Churn -35 (being Jan + Feb)
Closing customers 135 (being Feb closing customers)

When I select Apr

Opening customers 160 (being Apr opening customers)
New 15 (being Apr)
Churn -20 (being Apr)
Closing customers 155 (being Apr closing customers)

I have unpivoted the table and did a sum formula on the type (called Total Type) and then tried the following formula

Calculate([Total Type],Filter(All(Date),Date[YearQuarterNumber] = Max(Date[YearQuarterNumber]) && Date[Date] <= Max(date[Date])))

This works for new and churn but adds the opening and closing numbers.

Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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