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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply

Default date doesn't roll over to the next month in a slicer

Hi all,

 

I created a calculated column to get the current date and put it in a slicer to have TODAY by default. Then I added other calculated columns with a month name and year. The problem is when the current date hits the next month it can't roll over and is stuck in the same month. So I have to pick another "Today" in the next month.

powerbiuser444_1-1629145146000.png 

powerbiuser444_2-1629145421833.png

 

The logic in my columns is straightforward.

 

SlicerDate = IF([Date]=Today(),"Today",[Date]&"")
Month = FORMAT(DATE(1, MONTH([Date]), 1), "MMM")
Year = YEAR([Date])
 
Could you help to overcome that or should I use another logic?
1 ACCEPTED SOLUTION

@powerbiuser444 Use more than one slicer. One for year, one for month and one for date/today. Not ideal?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

@powerbiuser444 Seems like this has to do about having a hierarchy in your slicer. If you look at the Data view for your table I imagine that you do not actually have any dates in July flagged with Today?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler yes, it's true. July's 'Today' is empty, once I manually pick August's 'Today', July's 'Today' disappears. So this logic works only within a month, the 'Today' flag doesn't roll over to the next month.

@powerbiuser444 That's what I figured. The issue is the use of the hierarchy in the slicer, not the DAX code or anything like that. If you didn't have the hierarchy, you wouldn't have the problem... 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler I understand that but how can I combine month and date? If I want to see the whole month selecting 30 days is not an option

@powerbiuser444 Use more than one slicer. One for year, one for month and one for date/today. Not ideal?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler if it's the only option then okay, not ideal but what can I do. Anyway thanks for your replies

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.