Skip to main content

App Development

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

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $400 before Dec 31st: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie7
Partner - Creator II
Partner - Creator II

How to write rangesum expression for correct tenure calculation

Hello,

I'd like to modify the measure expression below so that the employee service period (tenure) information gets calculated correctly over time periods.  I've used the rangesum expression to accumulate the time period where employees are in the company.  

Newbie7_0-1633873544339.png

The visualization below is obtained when it is filtered to one employee who once left the company and came back at a later date.  However, the visualization is not correct in that the height of the bar chart should start at the bottom, but it is only starting from the middle point, even thought it is able to correctly represent the gap period where the employee once left the company and came back at a later date.  

Newbie7_1-1633873643034.png

Instead of the chart below, I'd like to write a measure expression where the bar chart starts from the bottom.  How can I modify the measure expression above so that the bar starts at the bottom and then accumulates thereafter while correctly maintaining the gap period as shown above?  

I tried bringing the rangesum function at the top of the expression, which brings the bar chart start from the bottom, but because it will be before the yellow highlighted expression, it ignores the gap period where employee was not working for the company, and does not produce correct calculation and visualization either.  

Newbie7_2-1633873936070.png

I'd greatly appreciate experts' help with this, as this issue has been bugging me for ages.  Thank you very much for your time and help in contemplating this issue for me.  

 

 

0 Replies