Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Share your agentic AI experience, learn from others, and earn a new badge: Put Agentic AI to Work
cancel
Showing results for 
Search instead for 
Did you mean: 
sujoybardhan
Partner - Contributor II
Partner - Contributor II

Inputsum function

I have an expression which is given below:

(Sum({<Year={$(=Max(Year))},Company={"ITC"},DTNo={$(=Min(DTNo))} >}Contr)

/

Sum({<Year={$(=Max(Year))},Company={"ITC"},DTNo={$(=Min(DTNo))} >}Volume))
/1000

Please let me know is InputSum works here because in a single expression InputSum is working but in that type of calculation logic it's not working.

 

Labels (3)
4 Replies
Chanty4u
MVP
MVP

Hi

Which value is not returning 

Try to debug where is the issue add one by one expression and test 

henrikalmen
Specialist II
Specialist II

There is no obvious syntax error to your expression, although you could shorten it like this:

{<Year={$(=Max(Year))},Company={'ITC'},DTNo={$(=Min(DTNo))} >} ((Sum(Contr) / Sum(Volume))
/1000

I'm not sure what you mean by "InputSum".

Like Chanty4u already said: add the two sum calculations as separate fields and see if you get the expected result. Verify what max(year) and min(DTno) expands to.

sujoybardhan
Partner - Contributor II
Partner - Contributor II
Author

Hi Henri,

"InputSum" is a function which is specifically allows you to give the input in Straight Table to change the value and it's working on runtime. There are few terms and conditions need to follow to use this.

Please check the Help option for details.

henrikalmen
Specialist II
Specialist II

Ah, it's a QlikView funtion not available in Qlik Sense, I did not know about that one. So I couldn't say if there is something the expression works with inputsum or not. But it seems the manual says inputsum accepts a field, not an expression? And that field should be defined with "inputfield" in the loadscript. Maybe you need to do (InputSum(Contr) / InputSum(Volume)), if it's possible to use two inputfields at the same time. Or sum(Contr)/InputSum(Volume) ?

I'm not sure since I haven't used this function...