Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Using a variable in set analysis

I have a KPI chart that calculates SALES and COST OF SALES (COS).  The COS number consists of Project Based COS + a monthly RECONCILICATION (RECON) amount.  I have a simple set analysis formula:

Sum({<ACCT_TYPE= {'COS'}>} AMT) +

Sum({<ACCT_TYPE = {'RECON'}, FYP = {'201506'}>} AMT)

The app has several filter panes. Two of them are: Fiscal Year and FYP (Fiscal Year + Period) Ex. 201506

I need the set analysis portion FYP = {'201506'} to match the user selection in the filter pane.

In addition, if there is no FYP selection, just FISCAL YEAR I need an assumption of the last month of the year" Ex. '201512'

Any help is appreciated.

Thanks

Marty

1 Solution

Accepted Solutions
MVP
MVP

Re: Using a variable in set analysis

Try

Sum({<ACCT_TYPE = {'RECON'}, FYP = {'$(=Max(FYP))'}>} AMT)

3 Replies
MVP
MVP

Re: Using a variable in set analysis

Try

Sum({<ACCT_TYPE = {'RECON'}, FYP = {'$(=Max(FYP))'}>} AMT)

Re: Using a variable in set analysis

May be this:

Sum({<ACCT_TYPE= {'COS'}>} AMT) +

Sum({<ACCT_TYPE = {'RECON'}, FYP = {"$(=Max(FYP))"}>} AMT)

Not applicable

Re: Using a variable in set analysis

Gentlemen,

Thank you for the quick response.  Syntax is everything. 

Community Browser