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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ghassanaldalati
Contributor III
Contributor III

Sum Data from first selected Month to Last Selected Month

Dear All.

please help me in this issue.

how can I have the summary of first selected month

                                                  and the last selected month

                                                  and sum form first to last selected month

Example:

Sales For Jan=1000     Feb=2000     Mar=3000     Apr=4000     May=5000   

     when I select from month list Feb+Mar+Apr

I get ( Feb=2000    Apr=4000     from Feb to Apr=9000  )

your coo-operation and support highly appreciated.

Regards

Please see the attachment

1 Solution

Accepted Solutions
sunny_talwar

Min

=Sum({<Month = {"$(=MinString(Month(Date#(Month, 'MMM'))))"}>}Sales)

Max

=Sum({<Month = {"$(=MaxString(Month(Date#(Month, 'MMM'))))"}>}Sales)

View solution in original post

5 Replies
sunny_talwar

Did you try just using Sum(Sales)? It should sum the sales for the selected months

ghassanaldalati
Contributor III
Contributor III
Author

That in case I Select Only One month.

and  if I select Feb+Mar+Apl+May the result will be sum from Feb to May

but what I need is sum for the first selection and sum for the last selection

sunny_talwar

May be this

Sum({<Month = {"$(=Max(Month))", "$(=Min(Month))"}>}Sales)

ghassanaldalati
Contributor III
Contributor III
Author

Please see the attachment and send me back the right formula in  the same attachment

regards

sunny_talwar

Min

=Sum({<Month = {"$(=MinString(Month(Date#(Month, 'MMM'))))"}>}Sales)

Max

=Sum({<Month = {"$(=MaxString(Month(Date#(Month, 'MMM'))))"}>}Sales)