Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QTD sales

Hi All,

I worked on calculating YTD MTD sales bith are works fine.But while calculating QTD on the same way not working properly.

Below are for your reference.

YTD >>>

Sum({<doj={'>=$(=YearStart(Today()))<=$(=Today())'}>}pkg)

MTD>>>

Sum({<doj={'>=$(=MonthStart(Today()))<=$(=Today())'}>}pkg)

QTD

Sum({<month={'>=$(=QuarterStart(Today())<=$(=Today())'}>}pkg)

Please suggest on this.

Labels (1)
1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

YTD >>>

Sum({<month=, year=, quarter=, doj={'>=$(=YearStart(Today()))<=$(=Today())'}>}pkg)

MTD>>>

Sum({<month=, year=, quarter=, doj={'>=$(=MonthStart(Today()))<=$(=Today())'}>}pkg)

QTD

Sum({<month=, year=, quarter=, doj={'>=$(=QuarterStart(Today())<=$(=Today())'}>}pkg)


month=, year=, quarter= ignores the selections in this fields, so you always get the YTD, MTD and QTD values.


Check this links hope it helps you.


Set Analysis for certain Point in Time

Set Analysis for Rolling Periods

Regards,

Jagan.

View solution in original post

6 Replies
sunny_talwar

Why did you change QTD to check on month? try with doj and should work:

Sum({<doj={'>=$(=QuarterStart(Today())<=$(=Today())'}>}pkg)

Not applicable
Author

Yes sunny also I tried with doj but didn't work.

Please help!

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

YTD >>>

Sum({<month=, year=, quarter=, doj={'>=$(=YearStart(Today()))<=$(=Today())'}>}pkg)

MTD>>>

Sum({<month=, year=, quarter=, doj={'>=$(=MonthStart(Today()))<=$(=Today())'}>}pkg)

QTD

Sum({<month=, year=, quarter=, doj={'>=$(=QuarterStart(Today())<=$(=Today())'}>}pkg)


month=, year=, quarter= ignores the selections in this fields, so you always get the YTD, MTD and QTD values.


Check this links hope it helps you.


Set Analysis for certain Point in Time

Set Analysis for Rolling Periods

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Thanks for your attachments very helpful.

Still am working on the same but no accurate result.

Please have a look at above attachments.

I don't know exactly where am wrong.

Kindly suggest on this.

Not applicable
Author

Now I got it.

Thank you !!!!!

sunny_talwar

Close the thread if it is all working now

Best,

Sunny