Rolling Quarter (Avoid Dates filter)

DamianX88

New Member
Joined
Mar 1, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,

Hope someone will be able to help me,

I would like to sum rolling quarter in Power BI but there is one problem when using selector (for ex. If I have only two months in 2021 and select in slicer 2021 Rolling Quarter Sum only 2 months and my intention is to
- find max month for selection (in this Case Feb 2021) and sum past 3 months ignoring data filters (so Dec 2020+Jan+Feb)

I wrote something like this but id doesn't work properly

Rolling sum 3 months =
VAR LastDate_ =
LASTDATE ( Raporty_sprzedaz_dzienna[Data])
RETURN
CALCULATE (
sumx (VALUES (Raporty_sprzedaz_dzienna[Data]),CALCULATE ( SUM (Raporty_sprzedaz_dzienna[Value] ) ) ),
FILTER (
ALL ( Raporty_sprzedaz_dzienna[Data]),
Raporty_sprzedaz_dzienna[Data] <= LastDate_
&& Raporty_sprzedaz_dzienna[Data] > DATEADD ( LastDate_, -3, MONTH )
)
)

Kindly ask for some advice

Damian
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,223,727
Messages
6,174,146
Members
452,547
Latest member
Schilling

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