Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Reply
adityavighne
Continued Contributor
Continued Contributor

Always select previous completed month page level filter

Hi Team,

 

I want page level filter which auomate the process of selection month which is previous completed month.

e.g. Current month is May 2020.

But I want page level filter who can select April 2020 whenever data udpates.

 

righ now i have manual selection of year and month.

date.PNG

 

Regards,

Aditya Vighne

1 ACCEPTED SOLUTION

Hi  @adityavighne ,

 

Have you checked my reply?

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @adityavighne

 

I guess you have a date table,right?

Then create 2 calculated columns as below:

 

Date Month is = IF(YEAR('Date table'[Date])*100+MONTH('Date table'[Date])=YEAR( EDATE(TODAY(),-1))*100+MONTH( EDATE(TODAY(),-1)),FORMAT('Date table'[Date],"MMMM"),BLANK())
Date Year is = IF(YEAR('Date table'[Date])=YEAR( EDATE(TODAY(),-1)),FORMAT('Date table'[Date],"YYYY"),BLANK())

 

Finally you will see:

Annotation 2020-05-22 161523.png

For the related .pbix,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@adityavighne , you can create a column like this and use in filter

 

Month Name =
var _mm= datediff([date],eomonth(today(),0),month)
return
switch( true(),
_mm =0, "Current Month",
_mm =1, "Last Month",
format([Date],"MMM-YYYY")
)

Month year Sort = format([Date],"YYYYMM") // Optional if you want show in ui.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

I'm not looking for this. I want my report always select completed month.

e.g. right now May is running so I want my report must show default data of April which is completed month. Also on 1st June it changes to May

 

regards,

Aditya

Hi  @adityavighne ,

 

Have you checked my reply?

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors