Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Conditional Formatting /check on date vs. Today()

Dear all,

 

I struggling a bit to get this done. I have a column with dates (planned due dates "init_end_date") and want to include an error icon to show that the date lies in past. So I created this measure, but the the measure does not give me back the right value....sometimes it does but sometimes it does not. Help to point me to my mistake and a soltion is a appreciated.

 

 

end date icon = if(MAX('tbl'[init_end_date])<=(TODAY()),0,1)

 

 

So why is this not returning a correct value in all instances ?

 

Thank you so much.

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 

    Dose not happend in mine test with <=today. Are you using the same column?Are init-end-date and planned due dates the same column?

     

    Can you copy paste part of the data table or share a sample pbix with same date format and type, I doubt this could be issue.

     

     

    Paul Zheng _ Community Support Team

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous 

      Hi Paul,

       

      thank you for looking at this...I gave it another retry. I found that it works now, but only if I am not displaying the measure value in a column....can you explain why that is?

       

      Cheers,

      Udo

  • Hi Anonymous ,

     

    Share some sample data here, so that we can understand what the requireemnt is and what is nor working.

    Currently just seeing the measure doesn't help whether it is working or not.

     

    Thanks,

    Pragati

  • Anonymous's avatar
    Anonymous
    Not applicable

    Pragati thank you for looking at my post. To give a bit more details I am adding screen shots to show you the measure results...

     

    The table is a bit longer so first results look good:

    Including the display of an error icon e.g. when dates are missing:

    But then there are many entries where I expect the measure to result in a value of "1" which and where it shows 0:

     

    Does that help you as a background ?