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
evadung
Frequent Visitor

How to display dates without todays date?

Hello, 

 

I have a calendar table wheres date, year, month, day and I want a column that shows what days are past = 0 and todays day = 1.

 

I have this formulas: 

1) IsCurrentDay = IF(AND(DAY(Kalender[Datum])=DAY(TODAY()), MONTH(Kalender[Datum])=MONTH(NOW())),1,0)
 This formula shows date for ex. 10.1.2023 as 1, for other years with same date but another year also marked as 1. 
 
2) IsCurrentDay = IF(AND(DAY(Kalender[Datum])=DAY(TODAY()), YEAR(Kalender[Datum])=YEAR(NOW())),1,0)
This formula shows date for ex. 10.1.2023 and 10.2.2023 as 1. But I want just date 10.2.2023 to be marked as 1.
 
I tried this one: 
IsCurrentDay = IF(AND(DAY(Kalender[Datum])=DAY(TODAY()), MONTH(Kalender[Datum])=MONTH(NOW()), YEAR(Kalender[Datum])=YEAR(NOW())),1,0)
 
but function AND allows only 2 arguments.
 
Is there any other options? Thank you
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You can add a column like

Is Current Day =
IF ( Kalender[Datum] = TODAY (), 1, 0 )

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You can add a column like

Is Current Day =
IF ( Kalender[Datum] = TODAY (), 1, 0 )

It works. 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