Forum Discussion
Anonymous
6 years agoNot applicable
Measure with multiple dates
I want to generate the the following dates in a single measure (Yesterday, Today, last week, and This week) such that when i drag this field to a table or card it gives a list of all four as a list w...
- 6 years ago
Not sure if this is what you mean, but you can get a card of those values with this one measure. Note that there are carriage returns in the "return" part.
Four Dates = var thisday = TODAY()var yesterday = thisday -1var thisweek = thisday - WEEKDAY(thisday) +1 & " - " & thisday-WEEKDAY(thisday) + 7var lastweek = thisday-6-WEEKDAY(thisday) & " - " & thisday-WEEKDAY(thisday)return"Today - " & thisday & "Yesterday - " & yesterday & "This Week - " & thisweek & "Last Week - " & lastweekI tried to add a pic of the card visual but pics aren't showing in my posts at the moment.If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Anonymous6 years ago
mahoneypat
6 years agoMicrosoft Employee
Not sure if this is what you mean, but you can get a card of those values with this one measure. Note that there are carriage returns in the "return" part.
Four Dates = var thisday = TODAY()
var yesterday = thisday -1
var thisweek = thisday - WEEKDAY(thisday) +1 & " - " & thisday-WEEKDAY(thisday) + 7
var lastweek = thisday-6-WEEKDAY(thisday) & " - " & thisday-WEEKDAY(thisday)
return
"Today - " & thisday & "
Yesterday - " & yesterday & "
This Week - " & thisweek & "
Last Week - " & lastweek
I tried to add a pic of the card visual but pics aren't showing in my posts at the moment.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Anonymous
6 years agoNot applicable