Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

Not able to understand the expression

Hello Everyone,

I am not able to understand the * and + means in the expression mentioned below :

SUM({<Doorstep_Scan_Dt={'$(=Date(Max(Calendar_Dt),"DD/MM/YYYY"))'},Doorstep_Scan_Hour={'<=$(=hour(now()))'},Doorstep_Scan_Day={'$(=Date(Max(Calendar_Dt),'WWWWW'))'}>

*

(< Doorstep_Scan_Cd = {$(vDoorstepCodes)} > + < Eo_In_Cd = { 'EVNFS', 'EVNKS', 'EVNLA', 'EVNOC', 'EVNRT'} > +

< Eo_Out_Cd = {'EVNAA', 'EVNAI', 'EVNDN', } >)


} Mailpiece)



please help me in understanding the code as how qlikview is evaluating the above expression.


Thank you

Regards

Ferha

1 Solution

Accepted Solutions
sunny_talwar

This is from the set analysis guide:

Capture.PNG

Look at Page number 4 of the attached pdf

View solution in original post

6 Replies
sunny_talwar

This is from the set analysis guide:

Capture.PNG

Look at Page number 4 of the attached pdf

sunny_talwar

I downloaded the above PDF from this location: Set Analysis: syntaxes, examples

maxgro
MVP
MVP

from QlikView help

Operator Description
+Union. This binary operation returns a set consisting of the records that belong to any of the two set operands.
-Exclusion. This binary operation returns a set of the records that belong to the first but not the other of the two set operands. Also, when used as a unary operator, it returns the complement set.
*Intersection. This binary operation returns a set consisting of the records that belong to both of the two set operands.
/Symmetric difference (XOR). This binary operation returns a set consisting of the records that belong to either, but not both of the two set operands

there are also some examples, search set analysis in the help

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Thanks but these I know but could you explain me in the above expression context as how qlikview evaluating the above expression as my understanding  they both are same but in qlikview we are getting different ans for both the expressions

SUM({<Doorstep_Scan_Dt={'$(=Date(Max(Calendar_Dt),"DD/MM/YYYY"))'},Doorstep_Scan_Hour={'<=$(=hour(now()))'},Doorstep_Scan_Day={'$(=Date(Max(Calendar_Dt),'WWWWW'))'},

Doorstep_Scan_Cd = {$(vDoorstepComplianceCodes)}, Eo_In_Cd = { 'EVNFS', 'EVNKS', 'EVNLA', 'EVNOC', 'EVNRT'},

Eo_Out_Cd = {'EVNAA', 'EVNAI', 'EVNDN'} >} Mailpiece_Count)

Anonymous
Not applicable

hi ferha,

please see:

QlikView Set Analysis Cheat Sheet

sasiparupudi1
Master III
Master III

one expression is summing Mailpiece and the other one is summingMailpiece_Count  ?

you could try the expressions in a text box to see if you get the same totals or not

=sum({< Doorstep_Scan_Cd = {$(vDoorstepCodes)} > + < Eo_In_Cd = { 'EVNFS', 'EVNKS', 'EVNLA', 'EVNOC', 'EVNRT'} > +

< Eo_Out_Cd = {'EVNAA', 'EVNAI', 'EVNDN', } >)}


} Mailpiece)


=sum({<Doorstep_Scan_Cd = {$(vDoorstepComplianceCodes)}, Eo_In_Cd = { 'EVNFS', 'EVNKS', 'EVNLA', 'EVNOC', 'EVNRT'},

Eo_Out_Cd = {'EVNAA', 'EVNAI', 'EVNDN'} >} Mailpiece_Count)

hth

Sasi