Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum based on selected month

Hello everyone,

I am new to Qlik Sense and i am trying to understand some basics.

I have the table shown below and i want to write an expression that gives me the sum of the "QTY" field starting from month number 1 until the number of month that will be given by the user.

So if the user wants to see the the aggregated quantity from Jan to Jun, he should be able to choose june (month number 6) and the formula should be able to calculate the sum of "QTY" from jan to jun.

Screen Shot 2018-02-11 at 10.35.27 AM.png

Basically i want to create a front end whereby the user chooses the month and the system is calculating values like "QTY" from month 1 until the chosen month, then i will use the result of the expression to update charts like the waterfall chart shown in the picture below

Screen Shot 2018-02-11 at 10.51.16 AM.png

Thank you for the help,

Andreas

4 Replies
Digvijay_Singh

The expression should me something like this -

Sum({<Month={">=1<=6"},Month=>}QTY)

But it depends on your data model, how your date/month etc fields are defined, formatted and associated with other data.

Anil_Babu_Samineni

Not entirely sure, Why Waterfall chart for this requirement. Can you share some data points from your model?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
zebhashmi
Specialist
Specialist

you can use an input box for Variable and pass the veritable to expression as qlik sense do not have input box you can do that with extension

Input box in qlik sense

Shivesh_Yadav
Contributor
Contributor

Hi, I have a similar type of question . Like every month new data is loaded. Suppose its loaded on 25th of that month. I want to calculate the sum of QTY from 1st date of that month till 25th.