Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
pkelly
Specialist
Specialist

Set Analysis

Hi all

Trying to get into Set Analysis more and have converted a few IF statements...

=sum(IF(Date(ind_Date, 'DD/MM/YYYY') = Date(varToday, 'DD/MM/YYYY'), ind_OnHandValue))

How would you go about writing the above in Set Analysis?

Thanks in advance for any assistance.

Regards

Paul

Labels (1)
3 Replies
Kushal_Chawda
MVP
MVP

Try

Sum({<ind_Date ={"$(=varToday)"}>}ind_OnHandValue)

Your ind_Date and variable date format should match

sunny_talwar
MVP
MVP

Try this:


=Sum({<ind_Date = {"=Date(ind_Date, 'DD/MM/YYYY') = Date(varToday, 'DD/MM/YYYY')"}>} ind_OnHandValue))

swuehl
Champion III
Champion III

If ind_Date field is formatted as a number and the variable as well, try:

=Sum( {<ind_Date = {$(varToday)} >} ind_OnHandValue)

Basically field ind_Date and your set modifier should be formatted the same.

If ind_Date is formatted as Date DD/MM/YYYY, try:

=Sum( {<ind_Date = {'$(=Date(varToday,'DD/MM/YYYY))'} >} ind_OnHandValue)