Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to add Alternate States to a variable as a parameter

Hi,

I have the following variable below.  How do I add Alternate States as a parameter to this variable.

vSpend = Sum({<$($1), BRANDLINK={'$2'}>}DISTRIBUTION_AMOUNT)

The Alternate States I have are :  Alternate1, Alternate2 and Alternate3

         

$1 - is used for period - ie YTD, MTD , etc...

$2 - are different brands

Kind regards,

Nayan

24 Replies
sunny_talwar

May be this

vSpend = Sum({[$3]<$($1), BRANDLINK={'$2'}>}DISTRIBUTION_AMOUNT)

Anonymous
Not applicable
Author

Hi Sunny

Thank you for your reply, however it did not work. I get a blank.

Kind regards

Nayan

Anonymous
Not applicable
Author

Hi Sunny

Here is my expression.  Is the state in the correct place

$(Alternate1,vSpend(vYTD))

Kind regards

Nayan

Anil_Babu_Samineni

No, Please post full condition

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

What is vYTD now?

Anonymous
Not applicable
Author

Hi Anil

My expression without Alternate States  $(vSpendTest(vYTD,FNB)) when expanded is as follows:

Sum({<Year = {'2018'},Period_ID = {"<100"}, BRANDLINK={'FNB'}>} DISTRIBUTION_AMOUNT)

where vYTD :  Year = {'$(vMaxYear)'}, Period_ID = {"<=$(vMaxMonth)"}

Hope this helps.

Kind regards

Nayan

sunny_talwar

May be try this

$(vSpendTest(vYTD,FNB, Alternate1))

Anonymous
Not applicable
Author

vYTD will be all transactions up to today.  So now will be October 2017.  The year, 2018,  shown in my reply to Anil , thats the Financial Year.

So what i'm trying to achieve is that I have a Chart Table where I want to create expressions where some are related to Alternate States.  I have 3 different list boxes with different Alternate States, and when I select a value from one of the list boxes, it should only affect the expression linking to that list box.

Hope I'm making sense.

Kind regards

Nayan

Anonymous
Not applicable
Author

Hi Sunny

I've tried that, there is a value, but not affected by the selections made in List box relating to Alternate State 1.

kind regards

Nayan