Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello all,
I am creating an app that looks at the second day of the month.
I want to create a set analysis that sums the data based on the second day of each month. I tried and searched with no luck.
this is what i have done. I used month start to look at the first day of the month, but how do i get the 2nd day of the month.
LET vFisrtDate =MonthStart(Today());
sum({<Date = {"$(=vFisrtDate)"}>}[ Amount])
This does the sum for 12/1/2022. But what i need is to do a sum based on 12/2/2022.
reason been the data is updated on 2nd day monthly.
Thanks All.
Just add +1 to the date, either when setting the variable or in the set analysis, e.g.
MonthStart(Today())+1;
as @Or suggested, you can try below
LET vFisrtDate = MonthStart(Today()) + 1;
sum({<Date = {"$(=DATE(vFisrtDate))"}>}[ Amount])
OR
LET vFisrtDate = MAKEDATE (Year(Today()) ,Month(Today()), 2 )
sum({<Date = {"$(=vFisrtDate)"}>}[ Amount])
Just add +1 to the date, either when setting the variable or in the set analysis, e.g.
MonthStart(Today())+1;
when i did this it added 1 month not day. Thanks
That seems unlikely, as adding 1 to a date adds a day.
You could also use MakeDate(Year(Today(),Month(Today()),2), I suppose.
as @Or suggested, you can try below
LET vFisrtDate = MonthStart(Today()) + 1;
sum({<Date = {"$(=DATE(vFisrtDate))"}>}[ Amount])
OR
LET vFisrtDate = MAKEDATE (Year(Today()) ,Month(Today()), 2 )
sum({<Date = {"$(=vFisrtDate)"}>}[ Amount])