Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sangeeth8787
Contributor III
Contributor III

MTD and MTYesterday'sDate

Hi,

 

I had requirement to evaluate difference between MonthToDate and MonthtoDate of Yesterday's value and their difference.

 

MTD Expression

 

=sum({<Date={">=$(=MonthStart(max(Date)))<=$(=max(Date))"}>}Value)--This expression is working absolutely fine 

 

MTyD =sum({<Date={">=$(=MonthStart(Date(max([Date])-1)))<=$(=Date(max([Date])-1))"}>}Value) -- I had tried to substract one day from date feild, but it isn't giving expected output, Please could any one give your thoughts on the above expression.

 

Thanks

 

Sangeeth 

Labels (1)
2 Replies
Vengatesh
Partner - Creator
Partner - Creator

Can you provide some sample data?
You Know What To Do.
sangeeth8787
Contributor III
Contributor III
Author

Hi,

 

The above two set expressions were actually working, but only issue I have come across is All the Dates are showing up instead of selected date.

MTD Date Query.PNG

When users select 3rd of May 2019 from filter, I want to only show 

                                                         MTD                                    MTyD                         Difference

                                                   (Upto 3rd May)                  upto 2nd May      (Difference between Month to Date nd Month to YestDay

03/05/2019                                3750.26                          2360.35                       1389.91                    

 

I don't want to show all the dates, but Date Dimension showing all the dates until the selected date. Is there any work to show only selected data and MTD value.

 

I have also attached sample data in excel.

 

Thank you

 

Sangeeth