Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rbrooks
Partner - Contributor III
Partner - Contributor III

Creating a bucket where records return true for multiple conditions

Hi Qlik Sense Community,

I have an calculation (set analysis) created for a few different visualizations but I want to give the user the ability to drill down to a specific program. There are four programs: CFO, General Relief, CF, and CW.

Currently, I have created four different measures that all use the same base calculation but there is one added filter in the set analysis that separates each measure from one another. Unfortunately this approach will not work because the user will not be able to drill to a program using a measure.

 

I am trying to create a field in the load script that will bucket the records into each program but if the record should exist in multiple buckets, then group it that way. Below is the current If (case statement) that I have tried applying but records that should be in multiple buckets are only placed in one.

if(PGM_COMBO like '*GA*','General Relief',
if(PGM_COMBO like '*CW*','CalWORKs',
if(CFO_IND = 1,'CFO',
if(PGM_CODE='FS','CalFresh')))) as Program

For example, Below is a table showing each program at the top and the calculations for each month (disposition Month). If this was converted to a bar chart, I want the user to be able to select not only a specific month, but also a specific program that will be used to filter on. 

Disposition MonthCFCWCFOGR
Nov-1999.71%99.70%99.51%99.98%
Dec-1999.33%99.39%98.55%99.89%
Jan-2099.53%99.39%99.18%99.89%
Feb-2099.58%99.14%99.23%99.94%
Mar-2099.56%99.53%99.40%99.71%

 

Does anyone have any suggestions?

 

Edit:

Here is an example of when the records should be counted (if record is 1 then it will be counted):

recordspgm_comboCFOFSGRCWCFO
1CW,GA,FSY1111
2FSY1  1
3FS,GAY11 1
4FS,CWY1 11
Labels (1)
  • SaaS

0 Replies