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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
razvan_brais
Creator III
Creator III

Month to date

Hy guys. What am I doing wrong in Month to date calculus? The result is 0 for this expression;

=Sum({<DATE={">=$(=Num(MonthStart(Max(GetFieldSelections(DATE)))))<=$(=Max(GetFieldSelections(DATE)))"}>} SALES)

1 Solution

Accepted Solutions
sunny_talwar

Do you select multiple dates or just a single date? May be try this:

=Sum({<DATE={">=$(=Date(MonthStart(Max(DATE)), 'DateFieldFormatHere'))<=$(=Date(Max(DATE), 'DateFieldFormatHere'))"}>} SALES)

View solution in original post

5 Replies
sunny_talwar

Do you select multiple dates or just a single date? May be try this:

=Sum({<DATE={">=$(=Date(MonthStart(Max(DATE)), 'DateFieldFormatHere'))<=$(=Date(Max(DATE), 'DateFieldFormatHere'))"}>} SALES)

trdandamudi
Master II
Master II

Can you share a sample with expected output..

In the above expression you are using "Num" for the greater than date, Is the date is numeric ?

Anonymous
Not applicable

Anil_Babu_Samineni

Would you be able to provide sample or try this too. I've added num function in the second date which you required

=Sum({<DATE={">=$(=Num(MonthStart(Max(GetFieldSelections(DATE)))))<=$(=num(Max(GetFieldSelections(DATE))))"}>} SALES)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
razvan_brais
Creator III
Creator III
Author

Thanks alot guys. It was the dateformat problem. I`m so happy when I see that I get answers so fast

Thank you again.