Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Not able to calculate column wise along with the datedifference for each row.
I created a flag for calculating the difference of date and it works row wise. Now I need to do the total of all the rows based on the datedifference and calculate the overall sum of the product Brand wise.
start_flag =first 3 months, end_flag = remaining months. Flag condition is written in data model level.
Brand | Product | Dec-2015 | Jan-2016 | Feb-2016 | Mar-2016 | Apr-2016 | May-2016 | Date | |
Brand1 | P1 | Actuals | 71 | 65 | 66 | 98 | 96 | 16 | Jan 2016 |
Brand1 | P2 | Actuals | 44 | 40 | 30 | 67 | 43 | 56 | Feb 2016 |
Brand1 | P3 | Actuals | 13 | 143 | 131 | 23 | 176 | 25 | Mar 2016 |
Brand1 | P4 | Actuals | 94 | 61 | 111 | 18 | 88 | 144 | April 2016 |
Based on the date, the flag works like for P1 it calculate the actuals from Jan to May. P2 - Feb to May, P3 - Mar to May (Actuals) so on.
For doing the sum(actuals) along with the date-difference : Product P1 it should be actual values from 65 to 144 - 1497.
P2- sum(actuals) = 1188.
=aggr(((sum({<Flag={'start_flag'}>}Actuals))+(sum({<Flag={'end_flag'}>}Actuals))),Product)
I dont know how to achieve it. Could you please suggest?
I am not fully sure I understand the issue here. Would you be able to provide a sample to look at?
It would be better if you share your sample app with small set of data
I couldn't provide the sample app. My issue is I couldnt sum the actuals columnwise with date difference.