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

13 mth calendar - restrict to relevant data

I have a chart that shows 13 month calendar with the following expression:

=Sum({$<[Physio] ={7},RDOKey={1},ReferredYYYY, YearMonth={">=$(=AddMonths(Max(YearMonth), -12))<=$(=Max(YearMonth))"}>}ActualValue)

This works Fine but with one issue.

If there is other data with different months loaded it will bring up the months for these too.  Therefore I need to restrict the YearMonth to the data where Physio = 7.

Any help of how to do this would be great.

Rhona

1 Solution

Accepted Solutions
Anonymous
Not applicable

Did you try to add a set analysis in max(YearMonth)?


Like this:

=Sum({$<[Physio] ={7},RDOKey={1},ReferredYYYY, YearMonth={">=$(=AddMonths(Max({<[Physio] ={7}>}YearMonth), -12))<=$(=Max({<[Physio] ={7}>}YearMonth))"}>}ActualValue)

View solution in original post

2 Replies
Anonymous
Not applicable

Did you try to add a set analysis in max(YearMonth)?


Like this:

=Sum({$<[Physio] ={7},RDOKey={1},ReferredYYYY, YearMonth={">=$(=AddMonths(Max({<[Physio] ={7}>}YearMonth), -12))<=$(=Max({<[Physio] ={7}>}YearMonth))"}>}ActualValue)

rcorcoran
Creator
Creator
Author

Elena

Thanks so much that works brilliantly.  I had tried but couldn't get it to work.

Thanks again

Rhona