Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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.

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

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
Luminary Alumni
Luminary Alumni

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