Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
PreranaM
Contributor
Contributor

Set Analysis with Parameter (Filters as variable)

List Of Variables:

1. vMarineHRExp:

pick(match($(vMarineHR), 1, 2, 3,4)
//Recruitment
, count({<[MHR._SourceFlag]={'Recruitment'},MHR.STATUS={'APPROVED'}
, $1
>} distinct MHR.map_id)
,//Promotion
count({<MHR._SourceFlag={'Promotion'}
, $1 
>} distinct MHR.CPM_ID)
,//Resignation
Count({<MHR.STATUS ={'FINALISED'},[MHR._SourceFlag]={'ResignationDismissal'},MHR.CTE_TYPE={'RESIGNATION'}
, $1
>} distinct MHR.CrewID)
,
//Dismissal
Count({<MHR.STATUS ={'FINALISED'},[MHR._SourceFlag]={'ResignationDismissal'},MHR.CTE_TYPE={'DISMISSAL'}
, $1
>} distinct MHR.CrewID)

)

2. vMarineHRPeriodFilter:

pick(match($(vMarineHRFlag), 1, 2, 3)
,//Current month
'CalendarPeriod={$(=max(CalendarPeriod))}'
,//YTD
'CalendarYear={$(=max(CalendarYear))},CalendarPeriod={"<=$(=max(CalendarPeriod))"}'
,//Rolling 12 months
'CalendarPeriod={">=$(=vLast12Month) <=$(=vCurrentMonth)"}'

)

and added set analysis as 

=$(vMarineHRExp(vMarineHRPeriodFilter))

just wanted to change my filter condition based on user input (filter can be : cureent month / YTD/Rolling 12 months)

so i have created vMarineHRPeriodFilter variable to finalize my filter and use this in my parameter set analysis vMarineHRExp

but its not working properly ... 😞 

1 Solution

Accepted Solutions
albert_guito
Creator II
Creator II

Hi,

Try to expand the variable with the parameter ...

=$(vMarineHRExp($(=$(vMarineHRPeriodFilter))))

Ag+

Ag+

View solution in original post

2 Replies
albert_guito
Creator II
Creator II

Hi,

Try to expand the variable with the parameter ...

=$(vMarineHRExp($(=$(vMarineHRPeriodFilter))))

Ag+

Ag+

View solution in original post

PreranaM
Contributor
Contributor

Thank u Albert  🙂

Its Working Now