Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
I have this formula to calculate one month after January, in our case: 01.02.2023 - 28.02.2023
{<[YearMonth]={"$(='>=' & yearstart(MonthStart(Addmonths(max(YearMonth),+1))) & '<=' & MonthEnd(yearstart(Max(YearMonth), +1)))"}>}
It is not showing the right month. Where is the error.
Thanks for your help!
Hello
Could you please use the below
{<[YearMonth]={">=$(=yearstart(MonthStart(Addmonths(max(YearMonth),+1))))<=$(=MonthEnd(yearstart(Max(YearMonth), +1)))"}>}
Try This one...
One month after January Start = Date(YearStart(Today(),0,2),'DD/MM/YYYY')
One month after January End = Date(MonthEnd(YearStart(today(),0,2)),'DD/MM/YYYY')
Instead of Today, use YearMonth field.
Check this formula in your case. If this is not working let we check any other possibilities.
@TomBond77 Hi
Kindly try this
{<[YearMonth]={">=$(=yearstart(MonthStart(Addmonths(max([YearMonth]),+1)))<=$(=MonthEnd(yearstart(Max([YearMonth]),+1))))"}>}
Would be better to write it with some aggregate function
Hi, may I ask you to clarify? Would you like when you select January the calculation will be one month after?
Yes , we get values for next month . Take below table for example
try this in front end and we will get values for next month
Sum({<Yearmonth={"$(=monthname(Yearmonth,1))"}>}Value)
tab:
load *,
monthname(Date) as Yearmonth;
load * Inline
[Grp,Date,Value
Fed,02/1/2023,1000
Zed,14/01/2023,2000
Fed,27/01/2023,15000
Fed,02/02/2023,3000
Fed,04/02/2023,3500
Zed,15/02/2023,1200
Fed,03/03/2023,1523
Zed,13/03/2023,5000
];
I have done something similar for one of my projects. But in my case, it was in the back end.
So this is what I did:
rename table XXXX to DataTemp;
Data:
Load *;
For i=0 to 1
Load Distinct Months ,
AddMonths(MonthStart(Months), $(i))+1 as PlusOneMonth,
Resident DataTemp;
Next i;
rename table Data to XXXX ;