11 Replies Latest reply: Nov 28, 2016 10:41 AM by Todd Buss

# Set Analysis with Today() expression

Hi guys,

i'm looking for some support.. I'm using this field:

- [Data Stat]= Date (DD/MM/YYYY)

- [Minuti]= it's a number used for the final sum

I'm implementing the set analysis in order to sum all the [Minuti] without using a filter pane in the visualization sheet.

The formula is:

Sum(\$<[Data Stat]={Today()}<}[Minuti])

But the today function doesn't work and it continues to give me error, can you help me?

Jack

• ###### Re: Set Analysis with Today() expression

Try like this:

Sum(\$<[Data Stat] = {"\$(=Date(Today(), 'DD/MM/YYYY'))}>} [Minuti])

• ###### Re: Set Analysis with Today() expression

Hi Sunny,

It's still doesn't working.. I've used the brackets (") but that counts like an error (the date() and the today() formula aren't shown in blue)

I don't think the problem is in the date format

Thanks

• ###### Re: Set Analysis with Today() expression

My bad, I missed a double quote at the end:

Sum(\$<[Data Stat] = {"\$(=Date(Today(), 'DD/MM/YYYY'))"}>} [Minuti])

• ###### Re: Set Analysis with Today() expression

and the start {

Sum({\$<[Data Stat] = {"\$(=Date(Today(), 'DD/MM/YYYY'))"}>} [Minuti])

• ###### Re: Set Analysis with Today() expression

Using Staffan's help as a starting point, I'm trying to do a similar set analysis with a date range, but keep coming up with nothing.  I suspect my problem is with the cumbersome syntax.  My simplified code looks like this:

count({\$<ReportDateEnd = {"\$(<Date(Today(), 'DD/MM/YYYY'))"}>} TransferReqID)

the  underlined "<" is intended to find all dates that are in the past.  I'm also looking for a count of cases rather than a sum of values.

Please let me know if I should start a new post rather than tacking my request on to this thread.  This is my first post here.  I'll continue with reading about Dates in Set Analysis to find clues.

Thanks.

• ###### Re: Set Analysis with Today() expression

Try putting < outside of the dollar sign expansion and also add = sign before Date

Count({\$<ReportDateEnd = {"<\$(=Date(Today(), 'DD/MM/YYYY'))"}>} TransferReqID)

• ###### Re: Set Analysis with Today() expression

Thanks for the rapid response, Sunny.  I appreciate your effort, but I still get zero results with the snippet you provided.

• ###### Re: Set Analysis with Today() expression

What is the format of ReportDateEnd? Is it DD/MM/YYYY? Also look here for help with dates in set analysis

Dates in Set Analysis

• ###### Re: Set Analysis with Today() expression

Thanks.  I had to format my dates in the Data Load Editor.  The formula you provided works.