Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Conditional columns

I have a report im working on and the user wants me to add a contional column that places OVERDUE for any date that isnt the current date.  I was able to create the coulmn, but I was only able to enter a single date.  How can I tell it to change daily so that todays date would be blank and eveything after is OVERDUE?

 

Thank you

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

    Create a custom column in Power Query like below.

    if [date]<=Date.From(DateTime.LocalNow()) then "due" else ""

     

    When you refresh the dataset, the column will be changed.

     

    Best Regards,

    Jay

8 Replies

  • HI Anonymous ,

     

    I understand very little of what you are trying to achieve.

    Can you share some sample data or screesnhots to understand your issue easily?

     

    Thanks,

    Pragati

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have files coming in to my report daily, for each file that is not the current date needs to be marked overdue.  Basically anything that is not the current date would be over due.  So today anything 7/22 and prior is over due then tomorrow anyhting 7/23 prior would be flagged and so on.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Here you go I placed teh data in excel.  I removed a lot of the other data elements, but you can see what im trying to do. Basically the file refershes each day.  Uses a column in PBI called  FOLLOW UP DATE this houses dates of the files.  I wanted to build a conditional column to call out all  over due files...files that have dates prior to todays date each day so tomorrow anything marked 7/23 would now have the over due tag.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

         

        Create a custom column in Power Query like below.

        if [date]<=Date.From(DateTime.LocalNow()) then "due" else ""

         

        When you refresh the dataset, the column will be changed.

         

        Best Regards,

        Jay

  • Anonymous , Are you trying to have a calculated column based on the slicer. That is not possible. You can have a measure.