Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a budget of get 100 new customers per year and I'd like to distribute the budget over the months.
A simply way would be divide 100/12 and write it one per month, but it wouldn't be nice, I'd prefer to assign natural numbers.
Something like this :
| Month | Customer Budget |
| ene | 9 |
| feb | 9 |
| mar | 9 |
| abr | 9 |
| may | 8 |
| jun | 8 |
| jul | 8 |
| ago | 8 |
| sep | 8 |
| oct | 8 |
| nov | 8 |
| dic | 8 |
| Total | 100 |
Regards, Marcel.
Hi Marcel, you can adapt to your requirements this epxression:
Floor(100/12)+If(Month<=Mod(100,12), 1, 0)
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
Load *,If(IterNo() <= Rem, BudgetTemp + 1,BudgetTemp) As NewBudget,SubField('$(MonthNames)',';',IterNo()) As MthNm While IterNo() <= 12;
Load *,Floor(Budget/12) As BudgetTemp,Mod(Budget,12) As Rem Inline [
CustID,Budget
1,100
2,120 ];