Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

What should be set expression to restrict dimension values one field but not in other field ?

Hi All ,

I have list of around 50 employee headed by 5 person . 

My requirement is to track sales ID by some 10 employee for any given  date range . 
But my set expression reduces the list of employee than needed . 

I  tried expression with pivot , but in vain 

1)  Count( DISTINCT {<TRANS={'B'},TYPE={'Music'},DATEE={">=$(=Date(eStartDate))<=$(=Date(eEndDate))"} >}ACTION_ID)

2) Count( DISTINCT {<NAME= {'Karole Peskett','Nikolaos Meedendorpe','Reg Andrzejak','Sigismondo Rudram','Antonius Beatens','Axel Este','Barny Chown'}, TRANS={'B'},TYPE={'Music'},DATEE={">=$(=Date(eStartDate))<=$(=Date(eEndDate))"} >}ACTION_ID)

With both  above expression , i could not get desired , below result 

data.PNG

 

Basically i need a set expression should give me the count of distinct ACTION_ID for given set of names against above Heads . 

Thanks & Regards

Shekar 

1 Solution

Accepted Solutions
sunny_talwar

Try this expression

Count(DISTINCT {<NAME= {'Karole Peskett','Nikolaos Meedendorpe','Raviv O''Connell',
'Reg Andrzejak','Sigismondo Rudram','Antonius Beatens','Axel Este','Barny Chown'},
 TRANS={'B'},TYPE={'Music'},DATEE={">=$(=Date(eStartDate))<=$(=Date(eEndDate))"} >}ACTION_ID) +
Sum({<NAME= {'Karole Peskett','Nikolaos Meedendorpe','Raviv O''Connell',
'Reg Andrzejak','Sigismondo Rudram','Antonius Beatens','Axel Este','Barny Chown'}>} 0)

View solution in original post

10 Replies
shekhar_analyti
Specialist
Specialist
Author

attached qvw 

shekhar_analyti
Specialist
Specialist
Author

@sunny_talwar  

Hi Sunny Bhai , please help with set expression 

shekhar_analyti
Specialist
Specialist
Author

@tresesco   ... Any help .. 

tresesco
MVP
MVP

May be just modifying the quotes like:

Remove the double quotes and add one more single quote as highlighted in red

Count( DISTINCT {<NAME= {'Karole Peskett','Nikolaos Meedendorpe','Raviv O''Connell',
'Reg Andrzejak','Sigismondo Rudram','Antonius Beatens','Axel Este','Barny Chown'},
TRANS={'B'},TYPE={'Music'},DATEE={">=$(=Date(eStartDate))<=$(=Date(eEndDate))"} >}ACTION_ID)
shekhar_analyti
Specialist
Specialist
Author

Hi Tresesco ,

Thanks for reply .

I tried your expresssion as well 

Count( DISTINCT {<NAME= {'Karole Peskett','Nikolaos Meedendorpe','Raviv O''Connell',
'Reg Andrzejak','Sigismondo Rudram','Antonius Beatens','Axel Este','Barny Chown'},
TRANS={'B'},TYPE={'Music'},DATEE={">=$(=Date(eStartDate))<=$(=Date(eEndDate))"} >}ACTION_ID)

 

But still its not working , out of 8 names from set expression only  5 is coming ..

dimesion restriction.png

 

sunny_talwar

I guess that is because of the date range selected.... I changed the end date to be 02-05-2019 and I am seeing this now

image.png

shekhar_analyti
Specialist
Specialist
Author

Thank You Sunny Bhai for replying .


But my requirement is that , irrespective of date range for given set of Names , ACTION id count should be tracked .

Let say for a given date range there is no ACTION id for most of the given set of names  , then still my chart show show their names with null or 0 as expression values .  

I am not sure how to do it , even through i have explicitly given the names in set modifier 

shekhar_analyti
Specialist
Specialist
Author

dimesion restriction 2.png

sunny_talwar

Try this expression

Count(DISTINCT {<NAME= {'Karole Peskett','Nikolaos Meedendorpe','Raviv O''Connell',
'Reg Andrzejak','Sigismondo Rudram','Antonius Beatens','Axel Este','Barny Chown'},
 TRANS={'B'},TYPE={'Music'},DATEE={">=$(=Date(eStartDate))<=$(=Date(eEndDate))"} >}ACTION_ID) +
Sum({<NAME= {'Karole Peskett','Nikolaos Meedendorpe','Raviv O''Connell',
'Reg Andrzejak','Sigismondo Rudram','Antonius Beatens','Axel Este','Barny Chown'}>} 0)