
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate YTD
Hello,
I am trying to calculate YTD sales which is the range from 1st of jan of the maxdate until the end of maxdate.
This is the expression that I input into the measurement.
Sum({$<OrderDate={'>=$(=YearStart(Max(OrderDate)))'}>}Sales)
However, the return value was 0 when I added the symbol "more than and equal(>=)" into the expression.
While I need the expression to return me a value of a summation of Sales from 1st jan until maxdate.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try changing your quotation from single to double.
Sum({$<OrderDate={">=$(=YearStart(Max(OrderDate)))"}>}Sales)
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try changing your quotation from single to double.
Sum({$<OrderDate={">=$(=YearStart(Max(OrderDate)))"}>}Sales)
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In order to create a YTD statement you should even add an upper limit of the date interval to your expression. Like this:
Sum({$<OrderDate={">=$(=YearStart(Max(OrderDate)))<=$(=max(OrderDate))"}>}Sales)
Qlik Community MVP
