Hi Jack,
the logic could look like this:
FILTER TABLE.DATE BETWEEN ROUND_MONTH(TODAY()) AND ADD_SECONDS(ADD_MONTHS(ROUND_MONTH(TODAY()),1),-1);
This logic would use TODAY() so 23.04.2024 and will set it between
01.04.2024 00:00:00 => ROUND_MONTH(TODAY())
and
30.04.2024 23:59:59 => ADD_SECONDS(ADD_MONTHS(ROUND_MONTH(TODAY()),1),-1)
For sure there are other way of doing similar filtering by using MONTH(TODAY()) AND YEAR(TODAY()) but I like using the way described above.
BR
Dennis
Hi Jack,
the logic could look like this:
FILTER TABLE.DATE BETWEEN ROUND_MONTH(TODAY()) AND ADD_SECONDS(ADD_MONTHS(ROUND_MONTH(TODAY()),1),-1);
This logic would use TODAY() so 23.04.2024 and will set it between
01.04.2024 00:00:00 => ROUND_MONTH(TODAY())
and
30.04.2024 23:59:59 => ADD_SECONDS(ADD_MONTHS(ROUND_MONTH(TODAY()),1),-1)
For sure there are other way of doing similar filtering by using MONTH(TODAY()) AND YEAR(TODAY()) but I like using the way described above.
BR
Dennis
@dennis.pflug Can't we create a filter of this kind?
FILTER ROUND_MONTH(TABLE.DATE) = ROUND_MONTH(TODAY());
@bunyod.sap edited it accordingly, thanks for pointing it out
@dennis.pflug Can't we create a filter of this kind?
FILTER ROUND_MONTH(TABLE.DATE) = ROUND_MONTH(TODAY());
@bunyod.sap edited it accordingly, thanks for pointing it out
@sathish.kumar.s Yes, however with Month.
FILTER ROUND_MONTH(TABLE.DATE) = ROUND_MONTH(TODAY());
@dennis.pflug Can't we create a filter of this kind?
FILTER ROUND_MONTH(TABLE.DATE) = ROUND_MONTH(TODAY());
@bunyod.sap edited it accordingly, thanks for pointing it out
Looks valid. Thanks for this easier readable logic :D
Thanks all for your input on this. Its much appreciated. I will try this out.
Adding this to an Olap table filter load script panel, I get the following error, should i be tweaking this code? (see screenshot)
Adding this to an Olap table filter load script panel, I get the following error, should i be tweaking this code? (see screenshot)
HI @jack.evera This snip from the error message is very common and based on this alone it's hard to give some advice.
The possible cause/scenarios:
- missing semicolon o ; ]
- incorrect date table.field
- missing parentheses e) or (]
Pls check otherwise we need more details.
Happy debugging. ;)
Cheers, Bunyod
Adding this to an Olap table filter load script panel, I get the following error, should i be tweaking this code? (see screenshot)
Hi @jack.evera,
As @bunyod.sap mentioned, could you provide load script code you have used for your OLAP table? We can assist you better!
Kind regards,
Sverre Klein
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.