Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
kshitijas
Not applicable

Difference between two selections

Hello Everyone,

        I have Two columns ie. Month and Cost , i want difference on basis of my selction of month.

     Eg. If i select Feb and March from Month Column i should gets the difference between them  ,

      If i select Jun and Jul from Month Column i should gets the difference between them .

Need to find the difference  ???

Thanks

2 Replies
Not applicable

Re: Difference between two selections

Hi Kshitija

You can use the Month field in a listbox. So when you chose the dates in the listbox it will filter your Qlikview model to just look at that those months you selected including the difference calculation

sunny_talwar
Not applicable

Re: Difference between two selections

May be something along these lines:

Sum({<month_id = {$(=Max(month_id))}>}Sales) - Sum({<month_id = {$(=Min(month_id))}>}Sales)

Where month_id is created in the script like this:

Year*100 + Num(Month) as month_id