Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can anyone please help me interpret what does the below expression do?
For your reference, Fiscal_Year_Recg_Sale_MonthStart_Date is nothing but the current Financial Year.
Sum({<Num_PostingDate={'>=$(=(floor(num(MakeDate(Fiscal_Year_Recg_Sale_MonthStart_Date+$(=($3)),$(=($1)),1)))))<=$(=(floor(num(MakeDate(Fiscal_Year_Recg_Sale_MonthStart_Date+$(=($3)),$(=($1)),$(=($2)))))))'}
>}[Sale Amount INR]) / 100000
The above code is pasted in a variable and some parameters are passed.
Please help me what does this date is picking up.
let's deconstruct this formular in a better readable state:
Sum( {<??>} [Sales Amount]) /1000 - i hope this part is clear
what is within the set analysis:
Num_PostingDate ={">= floor(num(Makedate(year + x3, x1, 1))) <= floor(num(Makedate(year + x3, x1, x2)))"}
this is a search string looking for any value between to values: {">= X <= Y"}.
Floor() just rounds the date to the day (which is a little redundant here, since Makedate already does this) and num() makes it a number so it matches the Num_PostingDate field.
Makedate( Year, Month, Day ) creates a dates form given numbers o year, month and date(number). These parameters are given here as $1, $2, $3. So your Input would be translated like this: ($1=month, $=day, $3=year_offset).
I assume that this expression is in a variable definition. then you may call this variable: $(vGetSalesAmount(1,21,2)) -> Gives you the sales amount between Jan, 1st and and Jan, 21st of the year 2024.
$(vGetSalesAmount(1,21,-2)) -> Gives you the sales amount between Jan, 1st and and Jan, 21st of the year 2020.
hope that helps (If so please mark as correct answer).
let's deconstruct this formular in a better readable state:
Sum( {<??>} [Sales Amount]) /1000 - i hope this part is clear
what is within the set analysis:
Num_PostingDate ={">= floor(num(Makedate(year + x3, x1, 1))) <= floor(num(Makedate(year + x3, x1, x2)))"}
this is a search string looking for any value between to values: {">= X <= Y"}.
Floor() just rounds the date to the day (which is a little redundant here, since Makedate already does this) and num() makes it a number so it matches the Num_PostingDate field.
Makedate( Year, Month, Day ) creates a dates form given numbers o year, month and date(number). These parameters are given here as $1, $2, $3. So your Input would be translated like this: ($1=month, $=day, $3=year_offset).
I assume that this expression is in a variable definition. then you may call this variable: $(vGetSalesAmount(1,21,2)) -> Gives you the sales amount between Jan, 1st and and Jan, 21st of the year 2024.
$(vGetSalesAmount(1,21,-2)) -> Gives you the sales amount between Jan, 1st and and Jan, 21st of the year 2020.
hope that helps (If so please mark as correct answer).