cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Morth
Helper I
Helper I

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 @Morth 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 @Morth 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!






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! 

@Morth 
Yes

Thank you 🙂

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors