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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

start and end dates

Good morning

Posted a question about a rolling 12 month calculation which I've managed to get right now, using expression below. But now I'm unable to make any further selections i.e. select regions etc.

I'm wondering if I should use a variable to select a start and end date - are there any other options?

This is the expression I have for the rolling year.

  

count({1<DateRaised={">=$(=addmonths(monthend(max(DateRaised))+1,-12)) <=$(=max(DateRaised))"}StatusFlagID

)

1 Solution

Accepted Solutions
Not applicable
Author

Try

count({$<DateRaised={">=$(=addmonths(monthend(max(DateRaised))+1,-12)) <=$(=max(DateRaised))"}StatusFlagID

)

The 1 or $ sign means that you base you calculation on the complete set of data (1) or the current selection ($). By using current selections ($), you can still change the region selections and such.

View solution in original post

2 Replies
Not applicable
Author

Try

count({$<DateRaised={">=$(=addmonths(monthend(max(DateRaised))+1,-12)) <=$(=max(DateRaised))"}StatusFlagID

)

The 1 or $ sign means that you base you calculation on the complete set of data (1) or the current selection ($). By using current selections ($), you can still change the region selections and such.

Not applicable
Author

Thanks that seems to be working find now, although I have noticed that when I select a region the date range changes which I assume has something to do with the $(=max(DateRaised)) part.