Forum Discussion

nmyre's avatar
nmyre
Icon for Helper III rankHelper III
6 years ago
Solved

Creating a relationship with current date function "NOW()" to show the data for that day.

Hello,

 

My Goal: Make a visualization that shows todays date by creating a column using Get Date = NOW(). It should also show data for that day. Such as the Julian date, the % of the year that has passed (example: 20 Jan = 5.5%, May 29 (today) = 40.4%), and the % goal for the end of month. End result should be a visual that updates each day. A makeshift visual is below:

 

 

Issue: I have a date table that includes information that is unique to each date in columns. I created a column on this table for todays date with NOW(). Adding the column added todays date to every row, making this dificult.

 

Attempts:

- I have tried using filters, but would need to manualy change the date every day.

- I have tried putting the Get Date = NOW() column on a differnt table, the data was very messy and hard to work with.

- I have considered using Functions and measures. I am not really sure what would be best. I considered something like:

 

Today Visual =

IF(

        ('Table'[Data Date] = 'Table'[Get Date]) = True

        Return 'Table'[Data Date]

)

 

That is bad, but in short, if the Data Date is todays date (Get Date) show the rest of the data in the row. Creating this relationship isn't easy.

I also considered Date/Time functions but don't know which would be best. Also of note, I am using fiscal years. Not calander years. Additional screen captures below:

 

  • Hi nmyre ,

     

    Like this?

    Today = TODAY()
    Today_Visual = 
    IF(
        'Table 2'[Date] = 'Table 2'[Today],
        'Table 2'[Date]
    )

     

    Try to use TODAY() function instead of NOW() function.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi nmyre ,

     

    Like this?

    Today = TODAY()
    Today_Visual = 
    IF(
        'Table 2'[Date] = 'Table 2'[Today],
        'Table 2'[Date]
    )

     

    Try to use TODAY() function instead of NOW() function.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • nmyre's avatar
      nmyre
      Icon for Helper III rankHelper III

      v-lionel-msft 

       

      You crazy son of a gun, you did it! Makes so much sense now that I see it.

       

      Thanks so much!