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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error using Set Analysis with Variable

Hello everyone,

I need your help,

I have some troubles with an expression using set analysis and a variable too.

This is my exprssion in a pivot table :

sum({$ <{$(vAndSubFamily)$(vNotSubFamily)}, Type = 'Actuals' >} [Amount])

$(vAndSubFamily)$(vNotSubFamily) are two succesive products choices

Actuals is a filter on the Sales Type , I have other Types like Budget and Quotations.


Do you know where the error comes from ?


Thank you,

Have a nice day,


David

25 Replies
ashfaq_haseeb
Champion III
Champion III

Its ok its learning curve

Your variable gives error

=if(count({NOT} distinct SubFamily)<>count({NOT<SubFamily>} distinct SubFamily), //some products selected (but not all) '*' & concat({$*NOT} distinct '<' & vRelevantField & '=E({<SubFamily={' & chr(39) & SubFamily & chr(39) & '}>} ' & vRelevantField & ')>','*',SubFamily), ' <$Field>')


Its not returning value.


Regards

ASHFAQ

Not applicable
Author

I try to search more in order to resolve it.

I just don't understand why everything working with :

sum({$(vAndSubFamily)$(vNotSubFamily)}Amount)


and not with


=sum({$ <SubFamily={'$(vAndSubFamily)','$(vNotSubFamily)'}, Type = {'Actuals'}>} [Amount])


Regards

David

ashfaq_haseeb
Champion III
Champion III

Contact me

myskypeID:ashfaqhaseeb

Regards

ASHFAQ

Not applicable
Author

Ok,

I will contact you.

Thanks,

Regards,

David

Not applicable
Author

ASHFAQ,

Thank you so much for your help. You made my day !

If it interest somebody the solution was :

=sum({$(vAndSubFamily)$(vNotSubFamily)*<Type={'Actuals'}>} [Amount])


David

ashfaq_haseeb
Champion III
Champion III

Welcome

Regards

ASHFAQ