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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.