Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

Set analysis

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)/

Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_type)

This expression gives me 100% Stack bar chart which i have required.

but when i drill down for branch_name it won't show 100% for branch_name.

what Changes need to be put in expression?

In Qlikview we can add the whole group of drilled down dimensions at branch _type

how can workout for this in Qlik sense?

please suggest.

18 Replies
its_anandrjs

Hi,

With your expression use the Dual function as well as in your expression that may solve your problem.

Regards,

Anand

sspawar88
Creator II
Creator II
Author

Hi Ruben,

its not working.

here i'm attached sample QVF to test.

thanks in advance.

rubenmarin

Hi Satish, this expression worked:

If(Count(total DISTINCT branch_type)>1,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_type),

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_name)

)

You can add more "levels":

If(Count(total DISTINCT branch_type)>1,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_type),

If(Count(total DISTINCT branch_name)>1,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_name),

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),loc_code),

))

sspawar88
Creator II
Creator II
Author

Hi Ruben,

Thanks for your great efforts.

But have you checked it for loc_code and loc_type.

beacuse i think its not working for them.

i used following expression

If(Count(total DISTINCT branch_type)>1,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_type),

If(Count(total DISTINCT branch_name)>1,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_name),

If(Count(total DISTINCT loc_type)>1 ,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),loc_type),

If(Count(total DISTINCT loc_code)>1 ,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),loc_code)))))

please check

rubenmarin

You only need the one I posted:

If(Count(total DISTINCT branch_type)>1,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_type),

If(Count(total DISTINCT branch_name)>1,

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),branch_name),

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),loc_code),

))

I don't see any selections where this doesn't work, but there are many possibilities to select in the chart, tell me with wich selections this doesn't works.

sspawar88
Creator II
Creator II
Author

It is not showing any loc_type and when i replaced loc_code with loc_type in 3rd expression

it doesn't show any loc_type and directly shows loc_code.

and also that loc_code it shows below 100%.


rubenmarin

In the qvf you posted, how can I see any loc_type? I don't see any loc_type in the dimensions, so if you replaced loc_code with loc_type in 3rd expression it's normal it shows below 100%.

sspawar88
Creator II
Creator II
Author

oops...sorry its my mistake.

QVF which i given to you hadn't any loc_type in drilled group which i used in dimension.

sorry for taking time.

rubenmarin

No worries, if you need working with loc_type upload a sample and I can help to make it work.

The login will be the same, just add another nested if with the next level of the group.