cancel
Showing results for
Did you mean:
Member

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

Accepted Solutions
Moderator

## Re: Displaying rolling time frame using card visual

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

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")

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

Regards,

Charlie Liao

2 REPLIES 2
Established Member

## Re: Displaying rolling time frame using card visual

Please use below formula for a column.

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

## Re: Displaying rolling time frame using card visual

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

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")

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

Regards,

Charlie Liao

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 6 members 1,161 guests
Recent signins: