Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kclayton1
Contributor III
Contributor III

Set Analysis Question

I am trying to use a variable to calculate the sum of payments for Services Dates that are less than or equal to the Variable Date with Payment Dates greater than the Variable Date. I have listed the formula I using below. I have not been able to get this to work. Currently, the Variable Date is setup in a Slider Object. Let me know how I should can adjust this formula to work.

=sum({$<ServiceDate={"<=$(vVariableDate)"},PaymentDate={">$(vVariableDate)"}>} PaymentAmt)

Thanks.

Kevin

1 Solution

Accepted Solutions
Not applicable

Does this work?

=sum({$<ServiceDate={"<=$(=vVariableDate)"},PaymentDate={">$(=vVariableDate)"}>} PaymentAmt)

View solution in original post

2 Replies
Not applicable

Does this work?

=sum({$<ServiceDate={"<=$(=vVariableDate)"},PaymentDate={">$(=vVariableDate)"}>} PaymentAmt)

swuehl
MVP
MVP

"..not been able to get this to work" is not a good issue description. Please describe what you get and what you see as best as you can. Posting a small sample application greatly helps us to help you, too.

If you want to debug a set expression using dollar sign expansion, it's good to see the expression with variables expanded. To see it expanded, create a straight table chart and copy your expression in. Leave the expression label empty. Close the property dialog.

Then, when hovering over the expression label in your chart, you should see the expression with variables expanded.

How does this look like? Does the format of your expanded vVariableDate matches the format of both your date fields?