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: 
kristof_j
Creator III
Creator III

variable with comma parameter

Hi all

I wanted to use a variable with parameter and use 'total' as parameter. Like this expression

$(eCountDistinct( total ))

So far so good.

When I want to expand the total with 2 parameter like 'total <product_level1, product_level2>' the comma is interpreted as the end of the variable parameter.

The following examples don't work:

  • $(eCountDistinct( total <product_level1, product_level2> ))
  • $(eCountDistinct( 'total <product_level1, product_level2>' ))
  • $(eCountDistinct( "total <product_level1, product_level2>" ))

How can I solve this?

22 Replies
sunny_talwar

Digvijay -

Would you be able to elaborate on the usage of $0? I have never used that before and would love to learn about it. Would you be able to share a sample or a link where I can read about it?

Thanks,

Sunny

Digvijay_Singh

Hi,


Here is the detail -


The parameter $0 returns the number of parameters actually passed by a call.

set MUL='$1*$2 $0 par';

set X=$(MUL(3,7)); // returns '3*7 2 par' in X

Link from help -

Dollar-sign expansion using parameters ‒ Qlik Sense

Thanks,

sunny_talwar

Make sense. Thanks for sharing that