Forum Discussion
Measure with multiple dates
- 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
Anonymous , Not very clear.
when we return value we can return a value only. So if you need this you need to have a series
table = generateseries(0,6,1)
measure = calculate(today() -min(Table[Value]))
On the card, this will give today date. when you use series to display it will give 7 days
I'm sorry if i wasn't clear. I should have mentioned that these respective dates would be generated from an existing date field. In your solution you mentioned that if i display it with a series, it will give 7days. Not sure what you mean by that.