Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulhv1
Creator II
Creator II

How to write set analysis for dates


I want below to work.

=SUM({< [FinanceRelease] = {$(=(CalendarDate))} >}  [Capex Item Gross Value])

where selected CalenderDate is 31-07-2014  (All the date formats are same i.e. DD-MM-YYYY)  then also this is not working

where as

when i write 

=SUM({< [FinanceRelease] = {'31-07-2014'} >} [Capex Item Gross Value])

it works perfectly ok.

1 Solution

Accepted Solutions
manideep78
Partner - Specialist
Partner - Specialist

HI Rahul, try like this


=Sum({<[FinanceRelease]={'$(CalendarDate)'}>}[Capex Item Gross Value])


OR


=Sum({<[FinanceRelease]={"$(CalendarDate)"}>}[Capex Item Gross Value])



It should work.


Regards,

Manideep

View solution in original post

9 Replies
avinashelite

Try like this

SUM({< [FinanceRelease] = {'$(=CalendarDate)'} >}  [Capex Item Gross Value])

manideep78
Partner - Specialist
Partner - Specialist

HI Rahul, try like this


=Sum({<[FinanceRelease]={'$(CalendarDate)'}>}[Capex Item Gross Value])


OR


=Sum({<[FinanceRelease]={"$(CalendarDate)"}>}[Capex Item Gross Value])



It should work.


Regards,

Manideep

rahulhv1
Creator II
Creator II
Author

Nope its not working Avinash

PrashantSangle

Hi,

Kindly check the following steps,

1: check that what it returns when you type in $(=(CalendarDate)) in text Object

2: use similar expression which you are trying in expression variable in your set analysis

3: Also check that after your expression execution your variable is still giving you out put in date format or number format.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
rahulhv1
Creator II
Creator II
Author

=Sum({<[FinanceRelease]={"$(CalendarDate)"}>}[Capex Item Gross Value])


This is working i.e. WHEN I USED Double Quote , it worked perfectly ok. But now the problem is other

i want to you <= i.e. date < or = ,

=Sum({<[FinanceRelease]={"$(<= CalendarDate)"}>}[Capex Item Gross Value])

is not working.

manideep78
Partner - Specialist
Partner - Specialist

Like this:

=Sum({<[FinanceRelease]={<="$(CalendarDate)"}>}[Capex Item Gross Value])


Regards,

Manideep

rahulhv1
Creator II
Creator II
Author

Nope, I already tried that,

 

=Sum({<[FinanceRelease]={"$(= max(CalendarDate))"}>}[Capex Item Gross Value])

this works but when i put <  it dos't work enven if i write as per your above statement, it do not work. It give syntax error (Red line)

manideep78
Partner - Specialist
Partner - Specialist

Hi Rahul

Try this: (Include <= symbol in double quotes before $ symbol)

=Sum({<[FinanceRelease]={"<=$(CalendarDate)"}>}[Capex Item Gross Value])


This will work for sure.


Regards,

Manideep

rahulhv1
Creator II
Creator II
Author

no.. its not working