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

Show only selected values in line graph and add up a sum

Hi!

I have data in the following format:

Date, Amount

06.03.1995, 10814,23

21.12.1995, 3760,76

30.01.1998, 3878,63

27.09.1999, 458,76

...

I created a listbox where you can select  a date or date range. The sum(Amount) is shown in a line graph. So far so good the result looks like this if 30.01.1998 and 27.09.1999 are selected:

LineGraph.JPG

But what I want to do is that the sum of "Amount" where "Date" is smaller than the smallest selected date is add up to the points in the line graph. In the end I want to have the following line graph but without the first two data Points (06.03.1995 and 21.12.1995) in it when the dates in the upper listbox are selected.

LineGraph2.JPG

I hope you understand my question.

Best regards,

Chris

6 Replies
sunny_talwar

Would you be able to share a sample?

Anonymous
Not applicable

like this:

=sum({<YourDateField={'<=$(=max(YourDateField)'}>} Amount)

avinashelite

to achieve this you need to make use of the two CALENDAR object  in Qlikview which will allow you to select the date range and using the variables you need to capture the calendar selection and then you need to use the same in set analysis

Anonymous
Not applicable

remove '=' in your case like

=sum({<YourDateField={'<$(=max(YourDateField)'}>} Amount)

sunny_talwar

May be this?

=Sum({<Date = {"$(='>' & Date(Min(Date)) & '<' & Date(Max(Date)))"}>}Amount)

Capture.PNG

chris186
Contributor
Contributor
Author

I see I didn't express myself clearly enough. I edited the picture so you can see what I want to achive.

If 30.01.1998 and 27.09.1999 are selected this should be the result:

rollupLineGraph.jpg

The sum of the amounts of the days before the minimum date selected should be the "invisible" starting point in the line graph.

I added some sample data if that helps. Thanks for your help!