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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Rsanjuan
Helper IV
Helper IV

Displaying rolling time frame using card visual

I am not sure how to make it so that if today is a date this week, to show the time frame for last week, assuming Sunday - Saturday is a week.

 

For example, here is how I am displaying 60 days from Today's date:

 

Meetings Hold60 = ([Today]-60)&"-"&([Today])

 

How would I display the time frame of last week:  July 17 - July 23?

 

When Today becomes Sunday, July 31st, the time frame of last week should change to July 24 - July 30.

 

Any ideas?

 

 

1 ACCEPTED SOLUTION
v-caliao-msft
Employee
Employee

@Rsanjuan

I am not sure how you would like to display rolling time frame with the card visual, but if you just want to show the last weekday as you described, then we could write the formula in the following format (Today() returns the value of 8/1/2016): 

Lastweekd = Today()-weekday(Today(), 1)-6 & " - " &today()-weekday(today(), 1) 

This would show the result in the following way: 

Capture.PNG

 

If you would like to format, then try the following formula: 

Lastweekf = FORMAT(today()-weekday(Today(), 1)-6,"mmmm dd") & " - " & FORMAT(today()-weekday(today(), 1),"mmmm dd") 

Capture1.PNG

 

Besides, regarding the Card visual, could you please share more details here?

 

Regards,

Charlie Liao

View solution in original post

2 REPLIES 2
v-caliao-msft
Employee
Employee

@Rsanjuan

I am not sure how you would like to display rolling time frame with the card visual, but if you just want to show the last weekday as you described, then we could write the formula in the following format (Today() returns the value of 8/1/2016): 

Lastweekd = Today()-weekday(Today(), 1)-6 & " - " &today()-weekday(today(), 1) 

This would show the result in the following way: 

Capture.PNG

 

If you would like to format, then try the following formula: 

Lastweekf = FORMAT(today()-weekday(Today(), 1)-6,"mmmm dd") & " - " & FORMAT(today()-weekday(today(), 1),"mmmm dd") 

Capture1.PNG

 

Besides, regarding the Card visual, could you please share more details here?

 

Regards,

Charlie Liao

Habib
Responsive Resident
Responsive Resident

Please use below formula for a column.

 

Last Week = FORMAT(TODAY()-7,"mmm dd") & " - " & FORMAT(TODAY()-1,"mmm dd")

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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