Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
daanciorea
Partner
Partner

Variable with Parameters

Hi group!

I am using the follow variable

vFormula = Sum({<ID = {1,2}, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13>}DATO)

I use the $1,..., $13 parameters to complete the variable with filters and fields that I need ignore.

If I complete all of $1, ..., $13 the variable work perfect. But, why not work good the variable when I don't complete all of $1, ..., $13?

In some objects I need complete all of $1, ..., $13 but in others don't and in this objects nothing is working. Do any can help me?

Thanks in advance.

Dan.

1 Solution

Accepted Solutions
isorinrusu
Partner
Partner

Hey,

An option is to use two variables.

So, your first variable would be vSumHours = sum({<$(vConcatFields($1,$2))>}Hrs.), and the second one is vConcatFields = $1=,$2= (etc.). When you call the variable, you would do something like $(vHoras(Cliente)) or $(vHoras(Cliente, Mes)), to ignore only Cliente or both Cliente and Mes.

See you tomorrow for a Special.

Regards,

Your boss.

View solution in original post

1 Reply
isorinrusu
Partner
Partner

Hey,

An option is to use two variables.

So, your first variable would be vSumHours = sum({<$(vConcatFields($1,$2))>}Hrs.), and the second one is vConcatFields = $1=,$2= (etc.). When you call the variable, you would do something like $(vHoras(Cliente)) or $(vHoras(Cliente, Mes)), to ignore only Cliente or both Cliente and Mes.

See you tomorrow for a Special.

Regards,

Your boss.

View solution in original post