Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Set analysis prob

Hey,

I want to use 2 different states in my expression. My scenario is:

Year : Inherited State

Month : Inherited State

GLDesc : State1

I have line chart with exp:

a:  Sum({State1<KPI = {'MktExpse'}>}Value) as Expenses

b:  Sum(Value1) as Sales

Now when i select any year or month, Expenses does not change untill i select any value from GLDesc.

I want Expenses expression to change for Year and Month Selection as well.

Thanks,

Nikhil

15 Replies
nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanks, it works but i didnt get how does the expression works with :

State *$  ?

Kushal_Chawda

Hi Nikhil.

State1*$ will give you the intersection of the record for State1 & Selected values

nikhilgarg
Specialist II
Specialist II
Author

Ohk, you mean to say that by State1*$ expression,

If i select 100 in GL : State1

and 2015 in Year : inherited state, it will give me data belonging to the combination of both?

Kushal_Chawda

Yes, Correct. There is two way to include the selection from inherit state

1) Either include it in set

Sum({State1<KPI = {'MktExpse'},Year=$::Year>}Value)


2) or use like below

Sum({State1*$<KPI = {'MktExpse'}>}Value)

Not applicable

Wouldn't Sum({State1*$<KPI = {'MktExpse'}>}Value) also include selections from fields you don't want?

Using Sum({State1<KPI = {'MktExpse'},Year=$::Year>}Value) I know Year will be included in my search with

any alternate state selections from state 1 but nothing else. So this would be the correct one to use in this instance? Please confirm


Thanks,

Byron

MayilVahanan

Hi

Please refer some sample for Alternate state

Alternate State Sample for Beginners

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.