Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

YTD portion calculation (in script) for cost allocation

Hi Community

After a couple of days without success I have decided to wave the white flag and ask for help. I have calculate the monthly YTD portion for each record in my table. My aim is to allocate a monthly expense balance based on the YTD portion calculated for each transaction/record in the table below and I want to do this in the script. The result should be as below. I am struggling to achieve this in Qlik.  I can get to the YTD portion by customer by month but the problem is that that doesn't add to a integer as the previous months drop off. I think the only way to avoid this is to have a YTD portion for each month in a separate field as below.  I wonder if the "peek" or "previous" functions could achieve this? Any feedback will be appreciated. App attached. !

Excel.png

1 Reply
Anonymous
Not applicable
Author

Sorted this, finally !