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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors