Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

how to write a MTD set analysis.

Hi guys,

i have a MTD set analysis as below:

Sum({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(MonthStart(Max(DateNum))))<=$(=Max(DateNum))"}>} Sales)


my scenario.

1) When i did not select anything - it does shows me the MTD sum sales.

2) But when i select a report_date selection: for exmaple the report_date is 22/10/2018. Then my MTD will turn to 0. 0 value.

So how can i have a MTD that when i select a report_date , it can still show the  sum sales of the report_date 22/10/2018 ?

Please help guys.

Rgds

Jim Chan

1 Solution

Accepted Solutions
andrey_krylov
Specialist
Specialist

Hi Jim. Try to add the report_date to set analysis

Sum({<Year=, Month=, Quarter=, Week=, DateField=, report_date=, DateNum={">=$(=Num(MonthStart(Max(DateNum))))<=$(=Max(DateNum))"}>} Sales)

View solution in original post

4 Replies
andrey_krylov
Specialist
Specialist

Hi Jim. Try to add the report_date to set analysis

Sum({<Year=, Month=, Quarter=, Week=, DateField=, report_date=, DateNum={">=$(=Num(MonthStart(Max(DateNum))))<=$(=Max(DateNum))"}>} Sales)

Anonymous
Not applicable

Hi

Try this may work

Sum({<Year=,Month={">=$(=Floor(MonthStart(DateNum)))"}>}Sales)

Thanks

jim_chan
Specialist
Specialist
Author

andrey,

if i have decided to put in the report_date= , does it ignore the report_date selection?

Rgds

Jim

andrey_krylov
Specialist
Specialist

Yes, report_date will be ignored.