Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
Not applicable

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

Tags (2)
11 Replies

Re: Set Analysis with Today() expression

Try like this:

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

Not applicable

Re: Set Analysis with Today() expression

Hi Sunny,

thanks for your reply.

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

Read here about Dates in Set Analysis

stabben23
Honored Contributor

Re: Set Analysis with Today() expression

and the start {

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

stabben23
Honored Contributor

Re: Set Analysis with Today() expression

if you are using qv12, try also today(1)

toddbuss
Contributor

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)

toddbuss
Contributor

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.