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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Calendar condition - How to show Calendar[Date]>TODAY (including) full current month

Dear,

 

I have an issue regarding a conditional column in the calendar. In fact, I would like to show the 'Calendar'[Date]>TODAY() BUT including the full current month.

 

 

When I do the previous formula, it did not include the month of November. 

 

Do you have a Formula to show the 'Calendar'[Date]>TODAY() including the full current month (even if we are the 25/11) ? 

 

Thanks you.

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

You can use YEAR, MONTH function to extract 'year', 'month' from TODAY function, then you can use DATE function combine them and get the last day of the previous month and compare with your column date values.

formula =
IF (
    'Calendar'[Date]
        > DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ) - 1,
    1
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

You can use YEAR, MONTH function to extract 'year', 'month' from TODAY function, then you can use DATE function combine them and get the last day of the previous month and compare with your column date values.

formula =
IF (
    'Calendar'[Date]
        > DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ) - 1,
    1
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi,

if I had to my Dim_Date table a new column = IF(Dim_Date[Date]>TODAY(),1,0) the formula works fine and Tomorrow has 1.

How do you build your Calendar Table? 

 

Regards

Lorenzo

Lorenzo,

I use the Calendar table from this link https://www.youtube.com/watch?v=zXZAZrUwUe8

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


kentyler
Solution Sage
Solution Sage

You should be able to use this DAX function :

Returns the first date of the month in the current context for the specified column of dates.

Syntax

DAXCopy
STARTOFMONTH(<dates>)  

 so your formula would become 

'Calendar'[Date]>STARTOFMONTH(TODAY() )
I'm a personal Power BI Trainer 






Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


amitchandak
Super User
Super User

Try Datesmtd

 

This Month = CALCULATE(sum(Sales[Sales Amount]),DATESMTD('Date'[date]))  

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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