Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

One Filter for Two Alternate States

Hi Community,

I have two compare two scenarios and for that I have two alternate state (as1,as2).

For this I have 5 (5X2) different filters, out of that three filter should be same for both states.

So is there any way I can use one filter for two alternate states.

Thanks in Advance

Prakash

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Yeah, you can do that. but it will something different

Keep those three filter in default state and in expression use something like this

Sum({$*[Alternate State1]} Sales)//$ represents default state

View solution in original post

13 Replies
vardhancse
Specialist III
Specialist III

Alternate state is only for comparative analysis.

Like base don the alternate state, the selections will pass.

Even though common filters, based on the alternate state the selections will pass.

sushil353
Master II
Master II

Hi,

See if this can help you: Alternate States issue using same variable

HTH

Sushil

CELAMBARASAN
Partner - Champion
Partner - Champion

Yeah, you can do that. but it will something different

Keep those three filter in default state and in expression use something like this

Sum({$*[Alternate State1]} Sales)//$ represents default state

vardhancse
Specialist III
Specialist III

Hi,

If the objects have different alternate states.

How can the selections will pass.

CAn we pas variables directly.?

CELAMBARASAN
Partner - Champion
Partner - Champion

By using set analysis we can choose the state that needs to apply, regardless objects state.

Not applicable
Author

Thanks all for your time any answers, I really appreciate your help a lot. 🙂

Not applicable
Author

Hi celambarsan,

Thanks for your wonderful help.


The above expression is working fine for me also in my one case.But in anther case of second expression not able to implement please help me out.

Variables written in the script:

set vAffinity1 =sum({<affinity_id={1}>} affinity_param_count) / sum({<affinity_id={1}>}total_population_affinity);

set vAffinity2 =sum({<affinity_id={2}>} affinity_param_count) / sum({<affinity_id={2}>}total_population_affinity);

set vAffinity3 =sum({<affinity_id={3}>} affinity_param_count) / sum({<affinity_id={3}>}total_population_affinity);

set vAffinity4 =sum({<affinity_id={4}>} affinity_param_count) / sum({<affinity_id={4}>}total_population_affinity);

set vAffinity5 =sum({<affinity_id={5}>} affinity_param_count) / sum({<affinity_id={5}>}total_population_affinity);

Expression used in the text object.

X=Num((0.16 * $(vAffinity1)) + (0.27 * $(vAffinity2)) + (3.2 * $(vAffinity3)) + (4.65 * $(vAffinity4)) + (2.32 * $(vAffinity5)),'###.00')

We want to calculate the value of X based on the selection alternate state filters.

Please help me ASAP

Regards,

Venugopal G

Not applicable
Author

Hi Celembarsan,

Above Expression is working for me..Thanks for your reply.

I Need one more help, One specific filter should not apply to chart even after making the selections in the filter.

Sum( {$*[StateA]}  dollar_value_sold)

Please help me as soon as Possible.

Regards,

Venugopal G

CELAMBARASAN
Partner - Champion
Partner - Champion

if you want to ignore one specific filter

then you can use

Sum( {$*[StateA]<FieldNAme=>}  dollar_value_sold)