Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
New Contributor III

Mulitply multiple variables within text object


I am creating a 'what if' scenario which allows users to change the value of months within a line chart by using variables and an input box.

My variables:

I want to show what the impact on costs would be (within a text object) if the figures input by a user where increased / deceased - I have been able to show the impact for number of people, like so:

=count(DISTINCT(SERVICE_PROVISION_18_PERSON_DESC, DIM_PERSON_ID)) + Apr + May + Jun + Jul + Aug + Sep + Oct + Nov + Dec + Jan + Feb + Mar

But having trouble incorporating this into a cost, I can only seem to add one variable to my expression and then it breaks as soon as I try to add more, here is what I am trying to work with:

=money(sum(if(len(SERVICE_PROVISION_18_PERSON_DESC)>1, FIN_WKLY_COST)) + vClientAverageWeeklyCost * Apr)

I have tried the following, which doesn't work:

=money(sum(if(len(SERVICE_PROVISION_18_PERSON_DESC)>1, FIN_WKLY_COST))) + $(vMonth(Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Jan, Feb, Mar))

Any help is appreciated

3 Replies

Re: Mulitply multiple variables within text object

Would you be able to share a qvw sample to play around with? Also, would be helpful to know expected output for all the months based on the inputs provided above

New Contributor III

Re: Mulitply multiple variables within text object

I can't share it unfortunately

For example, this is my chart:

If I then input figures for April and May you can see that the number of people have increased from 2,642 to 3,162, which is what i am expecting, however the cost has only increased based on the increase in people for April and not April AND May (=money(sum(if(len(SERVICE_PROVISION_18_PERSON_DESC)>1, FIN_WKLY_COST)) +

vClientAverageWeeklyCost * Apr)) as I dont know how to edit my expression to include the months for the rest of the year.

Hope this makes sense!


Re: Mulitply multiple variables within text object

How about a mock up? I won't really be able to offer much help without playing around with it. But if you are not able to share a mock up qvw also.. then may be someone else can offer help