Last 3 Months Slicer

JakubHa

New Member
Joined
Sep 23, 2016
Messages
4
Hi,

I`m trying to create a Slicer with Last Month, Last 3 months and Overall.

I tried one Dax formula described here: Power BI – Time Period Slicer for Last 7 Days,Last 30 Days.. – Analytics Avenue

DatePeriod =
UNION (
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-07+1,today()) ), 'Date'[Date]),"Period","Last 07 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-14+1,today()) ), 'Date'[Date]),"Period","Last 14 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-30+1,today()) ), 'Date'[Date]),"Period","Last 30 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-90+1,today()) ), 'Date'[Date]),"Period","Last 90 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date'), 'Date'[Date]),"Period","Overall")
)


But it doesn`t work for me. My dates are formated as only M+Y (no days):
01.01.2015 00:00:00
01.02.2015 00:00:00

<tbody>
</tbody>

Do you know any solution or workaround?

Many thanks,
Jakub
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I would use a disconnected slicer.

https://powerpivotpro.com/2013/08/moving-averages-controlled-by-slicer/

The above link shows how to use the slicer to put a number of months into the formula. That may work for you, but if not you can create a table like

Selection Number
Last Month 1
Last 3 Months 2
OVerall 3

Then create a measure for each option and the overall measure looks like

Switch([Number], 1, [Measure 1], 2, [Measure 2], 3, [Measure 3])
 
Upvote 0

Forum statistics

Threads
1,215,428
Messages
6,124,832
Members
449,190
Latest member
rscraig11

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