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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

showing the current year excluding this month in a graph

Good day to anyone reading this!

I am trying to find a way to display the dates in my date table to show the current year but exclude the current month. For example today it should show Jan, Feb, Mar & Apr excluding May. I've been looking around and playing with the filters but those don't seem to offer what I need so I would highly appreciate any help anyone can offer. 

Thank you in advance.

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @Anonymous My practical approach: in your Date table create 2 columns

1. CurrentMonth: FORMAT(TODAY(),"mmmm")
2. This Month:  IF(CurrentMonth=FORMAT ( [Date], "mmmm" ),"Current Month",FORMAT ( [Date], "mmmm" ))
I hope this help




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

5 REPLIES 5
devanshi
Helper V
Helper V

VAR Currentmonth = FORMAT(TODAY(),"mmmm")
 VAR Month =  IF(CurrentMonth=FORMAT ( [Date]"mmmm" ),Currentmonth-1,Currentmonth)
RETURN
Month
 
some_bih
Super User
Super User

Hi @Anonymous My practical approach: in your Date table create 2 columns

1. CurrentMonth: FORMAT(TODAY(),"mmmm")
2. This Month:  IF(CurrentMonth=FORMAT ( [Date], "mmmm" ),"Current Month",FORMAT ( [Date], "mmmm" ))
I hope this help




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Anonymous
Not applicable

Hey there @some_bih,

This did help yes! thank you for that I just have one question left if you don't mind would this work still if I were to load in the data set for the next month again? 

Thank you in advance! 

@Anonymous 
Yes

Anonymous
Not applicable

Thank you 🙂

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.