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: 
Just6
Contributor II
Contributor II

Calculate sum up to one day via a variable

Hello all,

I want to use the slicer to determine the day of my variable vDay.
The sum should be calculated up to this day. So add up all quantities that are smaller than my selected day.
Can someone give me a description / show me how to set this up?

Thank you!

Labels (1)
1 Reply
Aasir
Creator III
Creator III

Your variable vDay should be defined as =Max(YourDateField)

Your Slicer's data field should be YourDateField

Now you can use the vDay in your expression.
Sum({< YourDateField = {"<=$(vDay)"} >} SalesQuantity)