Forum Discussion
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.
Regards,
Aditya Vighne
Hi adityavighne ,
Have you checked my reply?
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
4 Replies
- amitchandak
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.
- adityavighne
Continued Contributor
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
- v-kelly-msft
Community Support
Hi adityavighne ,
Have you checked my reply?
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
- v-kelly-msft
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:
For the related .pbix,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!