Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

sushil353
Honored Contributor II

set analysis for a condition?

Hi All,

in my application i have a varialble vfact.

in a expression i used a condition as

if(vfact=1,sum(prd_failures),sum(measurement_failures))

i have used a button to set or reset the variable values...

prd_failures and measurement_failures are fields from different tables...

Is it possible to achieve same functionality using set analysis...

Thanks

Sushil

5 Replies
Not applicable

Re: set analysis for a condition?

add in your script a flag (1-0) in both tables so in your front end you can use set analysis about this flag

sushil353
Honored Contributor II

set analysis for a condition?

Hi dedagroup,

Can you give an example to use set analysis.

Thanks

sbaldwin
Contributor III

set analysis for a condition?

Hi if you really wanted to use set analysis you could do something like this but the question would be why not just use your If statement??

= sum( {<prd_failures={$(=if(vfact = 1,'*') )}  > } prd_failures)/

sum( {<measurement_failures={$(=if(vfact = 1,'*') )}  > } measurement_failures)

Thanks

Steve

sushil353
Honored Contributor II

set analysis for a condition?

I dont want to use if statement because my application slows down and takes time to perform calculations

Thanks Sbaldwin

erich_shiino
Honored Contributor

set analysis for a condition?

Hi Sushil,

Why don't you set the field directly on your variable like this:

You set vFact to prd_failures or to measurement_failures

Then, your expression will be:

sum( $(vFact))

Hope this helps,

Erich

Community Browser