Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm having an issue using set analysis in a list box to show selections based upon a variable.
What's happening is I have 3 buttons for Volumes, Cost, and Profits. These buttons control 2 variables (vCostList, vProfitList) and I'm using these variables to show which selections are possible (The selections make columns show in a table)
Everything works correctly except for when vProfitList is 1 and vCostList is 0. When this happens the %MeasureGroup Volumes will show, but Profit will not.
I have pasted my code below. Any help is greatly appreciated.
= | if(vProfitList = 1 and vCostList = 1, | ||
AGGR( | |||
ONLY({1} | |||
if(len(trim(%MeasureGroup))>1, %MeasureGroup & '\','') & %Measure | |||
) | |||
,%Measure | |||
), | |||
if(vProfitList = 1 and vCostList = 0, | |||
AGGR( | |||
ONLY({1}{$<%MeasureGroup = {'Volumes','Profit'}>} | |||
if(len(trim(%MeasureGroup))>1, %MeasureGroup & '\','') & %Measure | |||
) | |||
,%Measure | |||
), | |||
if(vProfitList = 0 and vCostList = 1, | |||
AGGR( | |||
ONLY({1}{<%MeasureGroup = {'Volumes','Cost'}>} | |||
if(len(trim(%MeasureGroup))>1, %MeasureGroup & '\','') & %Measure | |||
) | |||
,%Measure | |||
)))) |
Try putting the following in a text box and see if it returns any value
if(vProfitList = 1 and vCostList = 0,
AGGR(
ONLY({1}{$<%MeasureGroup = {'Profit'}>}
if(len(trim(%MeasureGroup))>1, %MeasureGroup & '\','') & %Measure
)
,%Measure
hth
Sasi