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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
taylorb
Helper I
Helper I

Using TODAY() In Historical Visuals

This is probably a very simple solution. I have a card for daily count that uses Today() but I also want to see the historical trend. I obviously cannot use Today() since it will only show today. What could I use instead to show the count on each calendar date? Currently, there is not a relationship between the Calendar table and the data table, because I only have the start and end dates so I dont want my filter to only include records that started or ended on that date. 

 

My Current measure:

CALCULATE(
    DISTINCTCOUNT(Assignments[ASSIGNMENT_ID]), 
    Filter(Assignments, 
    ([ASSIGNMENT_CURRENT_STATUS_NAME] = "Cleared to Start"  || ([ASSIGNMENT_CURRENT_STATUS_NAME] = "Cancelled" && Assignments[WAS_NEVER_STARTED] = false)) &&
    TODAY() >= 'Assignments'[START_DATE] && 
    TODAY() <= 'Assignments'[END_DATE] &&
    Assignments[JOB_POSITION_TYPE_NAME] = "Travel"
    ))

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@taylorb , you can use userelation and crossfilter to deal with this

refer

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

Also, refer to this video how to take trend using a disconnected table

https://www.youtube.com/watch?v=duMSovyosXE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@taylorb , you can use userelation and crossfilter to deal with this

refer

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

Also, refer to this video how to take trend using a disconnected table

https://www.youtube.com/watch?v=duMSovyosXE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I didnt know that you can use inactive relationships like that. Thanks so much

nandic
Super User
Super User

@taylorb ,
Is there a way to add new column which will represent actual date of reporting?
Example: today is 8/10/2020, tomorrow for all new rows it will be 8/11/2020, etc. 
In this case you would compare start/end date with this columns (this column will substitute functino Today() so that it can be dynamic).

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.