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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Abevann
Helper III
Helper III

Dates comparision in an IF

Guys,

 

I been working with this dashboard, and is confusing; the targuet is to have in % meta dist a division of incomings and target; the conditios is if the starting date in the slider is before 01/01/2021 (January 1rst 2021) then I should have a "No aplica", and if it occurs after, then the result of the division should be showed. In the example the date is December 27th 2020, so the leyend "No aplica" should be on the card.

Abevann_1-1614632204112.png

 

 

Any suggestion? Thanks a lot, regards,

Abelardo

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Abevann ,

 

if you want to check for a date you have to compare against a date. Use the DATE function in DAX to create a fixed date:

DATE(2021, 01, 01)

 

If you just write "01/01/2021" you do a division, so 01 / 01 = 1 / 2021 = 0.0004948(...)

If you have any questions, just let me know. If my answer was helpful, I would be happy if you could give me a thumbs up.

 

Best regards

Denis

View solution in original post

2 REPLIES 2
selimovd
Super User
Super User

Hey @Abevann ,

 

if you want to check for a date you have to compare against a date. Use the DATE function in DAX to create a fixed date:

DATE(2021, 01, 01)

 

If you just write "01/01/2021" you do a division, so 01 / 01 = 1 / 2021 = 0.0004948(...)

If you have any questions, just let me know. If my answer was helpful, I would be happy if you could give me a thumbs up.

 

Best regards

Denis

Thanks a lot Denis! 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors