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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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