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.
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.
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.
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.