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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.