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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
elinamcastelletta
Partner - Contributor II
Partner - Contributor II

Show missing values

Hello,

I need to get the values from D which are not assigned to a field in S:

SAD
1xx1
1xx2
1bb3
2bb4
2xx5
 xx6
 xx7

 

Example:

- No S selected. Result --> x6, x7 -Done: if( isnull(S),D)

-S=1 selected. Result -->b4,x5,x6,x7  - How do I show this result?

-S=2 selected. Result --> x1,x2,b3,x6,x7 - How do I show this result?

 
 
12 Replies
jwjackso
Specialist III
Specialist III

S=1:

If (Count({<S-={'1'}>}D) > 0,D,Null())

S=2:

If (Count({<S-={'2'}>}D) > 0,D,Null())

 

Suppress Nulls

Taoufiq_Zarra

an idea, may be :

=if(isnull(GetFieldSelections(S)),concat({<S={''}>} D,',')
,if(GetFieldSelections(S)=1,concat({<S={"*"}-{'1'}>} D,',')
,if(GetFieldSelections(S)=2,concat({<S={"*"}-{'2'}>} D,',')
)))

 

result :

No S selected

Capture.JPG

S=1 selected

Capture.PNG

 

s=2 selected

Capture1.PNG

 

attached qvf file

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
elinamcastelletta
Partner - Contributor II
Partner - Contributor II
Author

Hello,

 

Thanks for your reply.

The issue is  there are more than 100 possible values, so I cannot create an If( for each.

Is there a fuction that saves the selected value?

Taoufiq_Zarra

in this case :

=if(isnull(GetFieldSelections(S)),concat({<S={''}>} D,',')
,concat({<S={"*"}-{"$(=GetFieldSelections(S))"}>} D,',')
)
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
elinamcastelletta
Partner - Contributor II
Partner - Contributor II
Author

Hello, it is not working. I need one row by D missing .

 

I am trying to do it in the script.

 

Thanks for your help.

Saravanan_Desingh

Can u try this?

=Concat({1-$}D,',')
Saravanan_Desingh

commQV22.PNGcommQV23.PNGcommQV24.PNG

elinamcastelletta
Partner - Contributor II
Partner - Contributor II
Author

Hello,

Is there a way to avoid using Concat? I need to see each field in a straight table, one per row.

I tried with this but the second part didn't work:

=aggr(if(GetSelectedCount(S)=0,

              only(distinct{<D=E({<S={*}>})>}D),          -------> this works
              only(distinct{$<D=E(1{<S=P(S)>})>}D))    ---------> this doesnt work
    ,D)

 

Thanks

Kushal_Chawda

@elinamcastelletta  try below

=if(GetSelectedCount(S)=0,
only(distinct{<D=E({<S={*}>})>}D),
Only({<S={"*"}-{"$(=getfieldselections(S))"}>+<S,D=E({<S={"*"}>})>}D))