Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
samantha92
Contributor III
Contributor III

Mulitply multiple variables within text object

Hiya,

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
sunny_talwar

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

samantha92
Contributor III
Contributor III
Author

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!

sunny_talwar

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

Best,

Sunny