Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikviewRajK
Contributor II
Contributor II

expression brings back 0.00 as a result

Hi There - am struggling with some Qlik Sense expressions that work just fine in Qlikview - I'm trying to recreate the app in Qlik Sense

=Sum((BUDGET_VOLUME)*(1+(vOrderQtyChangePctg/100))) - brings back 0.00 as a the result.

Budget_Volume is column in a table, where as vOrderQtyChangePctg is a variable show value I set with a slider.

If I split the above as =Sum(BUDGET_VOLUME)+Sum(BUDGET_VOLUME*(vOrderQtyChangePctg/100)) then I get a result.

The issue is I have more additions and multiplications to do ...

Here's the equation that works just fine in Qlikview

floor(Sum
(
((BUDGET_VOLUME*(1+vOrderQtyChangePctg/100))*(BUDGETNETPRICE+vAdjPriceChange)) -
((BUDGET_VOLUME*(1+vOrderQtyChangePctg/100))*
(UNIT_FIXED_COST*(1+vFixCostChange/100)+
UNIT_VAR_COST*(1+vVarCostChange/100)
)
)
)
)

 

Hopefully, its something simple that I'm doing wrong.

thanks for any help, suggestions.

 

Regards

RK

Labels (1)
1 Solution

Accepted Solutions
QlikviewRajK
Contributor II
Contributor II
Author

closing thread as i found out the issue.  The variable's default value was not set correctly.  thanks Karthik.

View solution in original post

6 Replies
msKarthikeyan
Employee
Employee

Hi Raj,

can you try with Dollar Expansion for the variable? 

=Sum((BUDGET_VOLUME)*(1+($(vOrderQtyChangePctg)/100))) 

-Karthik 

QlikviewRajK
Contributor II
Contributor II
Author

thanks for the note Karthik.  Unfortunately that didn't work.

Here's what I tried

=Sum(BUDGET_VOLUME*(1+$(vOrderQtyChangePctg)/100))

OR

=Sum(BUDGET_VOLUME*(1+($(vOrderQtyChangePctg)/100)))

neither worked  - the result is blank, not 0.00

regards

 

msKarthikeyan
Employee
Employee

Hi Raj,

Can you check the individual values like 

sum(BUDGET_VOLUME) or $(vOrderQtyChangePtcg) and check whether values are correct? 

-Karthik 

msKarthikeyan
Employee
Employee

Also, what is the variable definition? 

QlikviewRajK
Contributor II
Contributor II
Author

here it is... not sure if this is the issue.  The idea was 0.00 will be the default value

QlikviewRajK_0-1593446247699.png

Thanks for any suggestions/help

QlikviewRajK
Contributor II
Contributor II
Author

closing thread as i found out the issue.  The variable's default value was not set correctly.  thanks Karthik.