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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nmyre
Helper III
Helper III

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:

 

3.png

 

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:

 

2.png

First.png

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @nmyre ,

 

Like this?

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

ff8.PNG

 

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.

View solution in original post

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @nmyre ,

 

Like this?

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

ff8.PNG

 

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.

@v-lionel-msft 

 

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

 

Thanks so much!

amitchandak
Super User
Super User

@nmyre , Not sure I got it. You can get use a relative date filter and use that

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

 

You can have a column like this in date calendar and filter on today

Is Today = if('Date'[Date]=TODAY(),"Today",[Date]&"")

 

Or have measure like

Calculate([Measure], Table[Date]=Today())

Calculate([Measure], Date[Date]=Today())

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors