Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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...
  • mahoneypat's avatar
    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 -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's avatar
    Anonymous
    6 years ago

    mahoneypat 

     

     

    Thanks so much, this is what i needed.