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

Gain/loss for a subscription

Hi,

I want to create an overview of all gains/losses over a selected period for a product which has a start and enddate. So we sell subscription-like products, where a gain is when the start date is in the selected period and a loss is where the end date is in the same selected period.

Since the date selection is only able to be connected to either the start or end-date dimension, I have tried other things, which weren't successfull:

1. Added a new date dimension which is apart from my data model to be able to select the date range and then make a selection on field level in the table. This doesn't work, because the report tells me that this is an invalid dimension. When pushing these values into variables, it does work once, but it doesn't refresh my data after date changes. 

2. 2 date selectors and a switch whether the user wants to see the gains or losses. This is far from a neat user experience, and also doesn't work, because the 2 selectors cannot have the same dates.

The only option I see now, is to completely divide the 2, but then I lose a lot of insights which I can provide if I could combine the 2 obviously.  

Any help would be very much appreciated

2 Replies
usamabinsadiq
Contributor III
Contributor III

hi 

 

please provide example data to work with,

thanks

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.
JeroenHoltrop
Contributor III
Contributor III
Author

Hi,

So here is an example of the data (dates are dd-mm-yyyy)

#start dateend date
101-03-201901-03-2020
201-05-201901-05-2022
301-03-202001-03-2022
401-02-202012-03-2020

 

So, I want to create my gain/loss report based on the period March 2020, where I see that I have a loss in contract 1 and 4 and a gain in contract 3. Contract 2 is active, and will therefore be ignored in this period for this report. 

Does this makes sense?