Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Month to Date Measure

Trying to create a measure that sums sales from Calendar month to date.

I have so far this expression:

(sum(aggr(sum(distinct{$<[completed_date.autoCalendar.Date]={">=$(=Date(max([completed_date])-30))"}>}(order_total)), order_id))

but if I am not mistaking, the value I am getting is sales from last thirty days, not "Calendar" month.  Any help to transform this expression to one that will show Month to date value?  Any help is appreciated.  Thank you!

2 Replies

Hi Ism,

I can see you are using the autoCalendar features.  I think the two that you want to use are the InMTD flag and the MonthsAgo field in your set analysis.

[completed_date.autoCalendar.InMTD]={1}   is for dates up to today's date in all months

[completed_date.autoCalendar.MonthAgo]={0} is for current month, so the two together will limit to this month


Contributor III
Contributor III

Don't think I have those fields.  Any other idea on how to do this?