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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

conditional sum based on two input box

Dear all,I have a straight table with 3 dimension (category, company and business unit) and an expression that is the daily balance.

My need is to compare the balance between two different dates.

I've created two variables and two input box date 1 and date 2.

I then used two expression for each input box like this one:

=SUM({$<DATE_REF={"$(=VAR_DATA2)"}>}Balance_CTV2)

=SUM({$<DATE_REF={"$(=VAR_DATA1)"}>}Balance_CTV2)

but the result is always "0" even the data exist.

I've laso tried without the " but always the same 0.

What is wrong in my expression?

Thank you

24 Replies
Not applicable
Author

Hi Marcellino,

many thanks for your reply. Unfortunately your suggestion doesn't work

maxgro
MVP
MVP

Sum ({$ <DATE_REF={'$(VAR_Data_1)'}>} BALANCE_CTV2)

Sum ({$ <DATE_REF={'$(VAR_DATA2)'}>} BALANCE_CTV2)

1.png

Anonymous
Not applicable
Author

Looks like issue was with field name you were using in the set analysis, correct field name is in all upper case, BALANCE_CTV2

Check the attached.

Not applicable
Author

Hi Massimo,

excuse but today I was busy all day, and I read just now.

Please try the attached file now works for me.
I just rewrote the formulas, so it is not necessary that in the load script you create new fields.


Bye
Gennaro

Not applicable
Author

Dear Gennaro! YES! You got it! NOw it works perfect!

really many thanks for your time! Much appreciated!

See you