Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
An issue has been identified on Qlik Cloud hub, please visit our Status Update Page for details: GET THE LATEST
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator II
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
alexandros17
Partner - Champion III
Partner - Champion III

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


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


let me know

antoniotiman
Master III
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

paulwalker
Creator II
Creator II
Author

Hi ,

Still i am unable to get values...

jyothish8807
Master II
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
antoniotiman
Master III
Master III

See Attachment

maxgro
MVP
MVP

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

1.png

try with

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