Skip to main content

# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for
Search instead for
Did you mean:
Creator II

## need help??

Hi Community,

how to calculate MTD and YTD

MTD:

=Sum({<[Posting Date]={'>=\$(=MonthStart(Today()))<=\$(=Today())'}>} CLE_Amount)

i am using this expression.. but unable to get values..

Please anyone can help me.....

6 Replies
Partner - Champion III

Sum({<[Posting Date]={'\$(>=MonthStart(Today())<=Today())'}>} CLE_Amount)

the \$(= ... must be applied to the whole sub expression

let me know

Master III

Hi Paul,

format of Posting Date is DD-MM-YYYY, but in script your DateFormat is D/M/YYYY

You can try

....\$(=Date(MonthStart(Today()),'DD-MM-YYYY')))

also in \$(=Today())

Regards,
Antonio

Creator II
Author

Hi ,

Still i am unable to get values...

Master II

Hi Paul,

try like this:

SUM({<Date = , Month =, Quarter = , Date = {">=\$(=MonthStart(Today()))<=\$(=Today())"}>}Sales)

will give you Total Sales for Current Month to Date

SUM({<Date = , Month =, Quarter = , Date = {">=\$(=YearStart(Today()))<=\$(=Today())"}>}Sales)

will give you Total Sales For Current Year to Date

Regards

KC

Best Regards,
KC
Master III

See Attachment

MVP

it seems you have different format for the dates, in dimension and in set analysis expression

try with

=Sum({<[Posting Date]={">=\$(=date(MonthStart(Today()),'MM-DD-YYYY'))<=\$(=date(Today(),'MM-DD-YYYY'))"}>} CLE_Amount)

Community Browser