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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis as well as matching text/numbers

I have a set analysis expression

 

sum

({$<[Date] = {">=$(=addmonths(max(Date),-$(vSelectNoOfMonths)+1))<=$(=max(Date))"}>}[Accidents Count ID])

The above is working fine but I wish to further filter the analysis by only having the above for records where a field 'Immediate Cause' is populated by a number of values such as '12i', '12j','12k' etc etc. I have tried adapting the like/match commands but cannot combine those with the set analysis expression above

Any ideas please?

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Easier than it seems!

Sum({< [Date] = {">=$(=addmonths(max(Date),-$(vSelectNoOfMonths)+1))<=$(=max(Date))"}, [Immediate Cause] = {"12*"} >} [Accidents Count ID])

That will check for all values starting by "12"

Hope that helps,

Miguel

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Hi,

Easier than it seems!

Sum({< [Date] = {">=$(=addmonths(max(Date),-$(vSelectNoOfMonths)+1))<=$(=max(Date))"}, [Immediate Cause] = {"12*"} >} [Accidents Count ID])

That will check for all values starting by "12"

Hope that helps,

Miguel