3 Replies Latest reply: Feb 23, 2016 10:26 AM by Marty Kunofsky

# 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

• ###### 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)

• ###### Re: Using a variable in set analysis

Gentlemen,

Thank you for the quick response.  Syntax is everything.