Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
A variable "CuurentYear" is declared as: Max(Right(FiscalYear,4)) -1 & '-' & Max(Right(FiscalYear,4))
Works Fine: Sum({<DOBStatus = {'C'},FiscalYear = {'$(=$(CurrentYear))'}>}DOBQty)
then I tried to use < sign in below clause it just stop working:
Does Not Work: Sum({<DOBStatus = {'C'},FiscalYear <= {'$(=$(CurrentYear))'}>}DOBQty)
Can somebody please help,
Thanks & Regards,
Hello Shazad,
Please use below code:
Sum({<DOBStatus = {'C'}, FiscalYear = {"<=$(=$(CurrentYear))"}>}DOBQty)
Hope this will help.
Regards!
Rahul
Hi Rahul, I have tried it. it doesn't help.
What does the FiscalYear? It is a field isn't it? Is it dates in it? If so how are they formatted?
I don't quite understand what you are trying to achieve with the CurrentYear expression... This will always evaluate to -1 and nothing else...
Try below, depends on how your variable is defined
Sum({<DOBStatus = {'C'},FiscalYear = {"<$(CurrentYear)"}>}DOBQty)
or
Sum({<DOBStatus = {'C'},FiscalYear = {"<$(=CurrentYear)"}>}DOBQty)
A variable "CuurentYear" is declared as: Max(Right(FiscalYear,4)) -1 & '-' & Max(Right(FiscalYear,4))
This is not going to work because your variable is essential a text and seems like Fiscal Year might be a text field also. May be you need another non-text field from your calendar object to do this kind of set analysis because you cannot do <, <=, >=, > on text fields and you need numeric fields for that.
May be look at this blog: Fiscal and Standard Calendar generation and create another FiscalYear like this
YearName(Date, 0, $(vFiscalYearStartMonth)) AS FiscalYear; // Fiscal Calendar Year
and then use this like this:
Sum({<DOBStatus = {'C'},FiscalYear = {"<$(=YearName(Max(FiscalYear)))"}>}DOBQty)
Sum({<DOBStatus = {'C'},FiscalYear = {'<$(=$(CurrentYear))'}>}DOBQty)
try this
best regards