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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors