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: 
Anonymous
Not applicable

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+
Anonymous
Not applicable
Author

Thank u Albert  🙂

Its Working Now