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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Need help in DAX

Experts, please help me to fix the below DAX code. I am trying to compare/equal to date passing from create data with todays date, it is throwing the error. pls help

 

BalaKiranM_0-1673799886925.png

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,
If what you are trying to do is to filter out today's date,  drop the measure in the filter pane for this visual as in the picture below. = N will get you every date but today, Y will get you only today.

Nathaniel_C_0-1673810000880.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Nathaniel_C
Community Champion
Community Champion

Hi @Anonymous ,

Try this please:

Date compare = IF(MAX(compare[Date]) = TODAY(), "Y", "N")

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thanks @Nathaniel_C for your quick reply, unfortunately your code is not helping to get the Max date. I don't understand why my date is not getting the MAX date from the Date column. pls help. It should filtered out 01/15/23.

 

BalaKiranM_1-1673805368596.png

 

 

Hi @Anonymous ,
What are you trying to do? When I read your first post, my understanding is that you wanted to compare each create date and compare it to today's date.  If it matches, mark it Y in a new column, or if it does not, mark it N.  Which is what I did.  If that is not what you are looking for, please give us a visual for your expected results.  You can dummy this up in Excel if you need to do so.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Anonymous ,
If what you are trying to do is to filter out today's date,  drop the measure in the filter pane for this visual as in the picture below. = N will get you every date but today, Y will get you only today.

Nathaniel_C_0-1673810000880.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Anonymous 

Nathaniel_C_0-1673801175238.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.