Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
uacg0009
Partner - Specialist
Partner - Specialist

Hurry - Alternate states- Link Sell

Hi all,

I have data:

linksell.png

And I used alternate states to calculate, for example, when a vip bought ITEM=B, what other ITEM did they buy in the same TRANS?

I created a alternate state named Items 123, and I choose B then, copy B to alternate state and clear the inherited state,like:

linksell1.png

then I created a straight table, expression is sum(QTY), and dimension is 

=Aggr(

If(

Count(DISTINCT {<ITEM = [Items 123]::ITEM>} ITEM)>0

and

Count(DISTINCT {<ITEM = -[Items 123]::ITEM>} ITEM)>0

, ITEM

)

,TRANS

)

but the result is null.

I don't know how to solve it and you can find all what I showed you in the attached file.

In this example, what I want is :

ITEM QTY

A       2

C       1

I hope I have clarified what I want. If you have any problem pls feel free to tell me.

Thank you so much!

7 Replies
Not applicable

Hi

to use alternate state you need to declare 2 groups

Then duplicates every filter (one inherites from group1 and other from group2) you need to compare

Then pick up a selection in filter-G1 and filter-G2 to make comparaison

Best regards

Chris

uacg0009
Partner - Specialist
Partner - Specialist
Author

Hi christian,

Thank you for your reply. I have created a alternate states called Items 123,so now I have two groups right?

inherited and Items 123. And I have a button to copy the selections from inherited to Items 123. so I think I can use this

to compare. Is what I said right?

Not applicable

No you need to create 2 groups (items123 and items456)

then you must need filters related to both of this groups

Ex :

List box with field_1  status items123

List box with field_1  status items456

then you select in one or both of your list box

Expressions have to be made like  sum({<items123>}  values)

chris

uacg0009
Partner - Specialist
Partner - Specialist
Author

Could you please give me a example if possible?

Because I tried to create a state Items 456, and two list boxes, and choose one of them, it didn't work.

Not applicable

Here is the way to do it

click alternatestate

Add 2 groups  (Group1, group2, or whatever Items123...)

Add new list object and

Add a second object and affect Group2

in your Graph object , expressions

sum({[Groupe1]} Montant)

sum({[Groupe2]} Montant)

best regards

Chris

uacg0009
Partner - Specialist
Partner - Specialist
Author

Hi chris,

I know how to create a alternate state and how to use it, but I don't know how to calculate what I want:

for example, when a vip bought ITEM=B, what other ITEM did they buy in the same TRANS?


Do you have any idea about that?

Not applicable

Sorry I misunderstood your problem

you could solve this by the model, creating a second table  VIP / ITEM as ITEM2 / Quantity as QTY2

Select ITEM From Table 1 will link to VIP (table1 and Table 2) and gives all items bought by VIP in table 2

but i'm not sure this will fit all your needs because i don't know what exactly you have to do

Best regards

chris