Forum Discussion
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.
Any suggestion? Thanks a lot, regards,
Abelardo
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
2 Replies
- selimovd
Most Valuable Professional
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
- Abevann
Helper III
Thanks a lot Denis!