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
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
3 REPLIES 3
amitchandak
Super User
Super User

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

nandic
Memorable Member
Memorable Member

@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
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