cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Custom Calculated Column

I want a calculated column that will return a customised column as shown in the snip below, so that when i use the column as a filter on my report, users can select current month to show details for the active month.

 

Capture.PNG

 

Many thanks for the assistance.

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@Selded , In you date table you can have a column like

 

Month Type = Switch( True(),
eomonth([Date],0)= eomonth(Today(),0),"Current Month" ,
Format([Date],"MMM-YYYY")
)

 

or

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"Current Month" ,
Format([Date],"MMM-YY")
)

 

Sort this on a column Format([Date],"YYYYMM")

 

Refer:  https://www.youtube.com/watch?v=hfn05preQYA

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
Super User IV
Super User IV

@Selded , In you date table you can have a column like

 

Month Type = Switch( True(),
eomonth([Date],0)= eomonth(Today(),0),"Current Month" ,
Format([Date],"MMM-YYYY")
)

 

or

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"Current Month" ,
Format([Date],"MMM-YY")
)

 

Sort this on a column Format([Date],"YYYYMM")

 

Refer:  https://www.youtube.com/watch?v=hfn05preQYA

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors