Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
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

11 Replies
sunny_talwar

Try like this:

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

Not applicable
Author

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

sunny_talwar

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

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

sunny_talwar

Read here about Dates in Set Analysis

stabben23
Partner - Master
Partner - Master

and the start {

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

stabben23
Partner - Master
Partner - Master

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

toddbuss
Creator
Creator

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.

sunny_talwar

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

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

toddbuss
Creator
Creator

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