Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
arixooo123
Contributor

Hide excluded with Aggr & if isnull in qlik sense

I want to hide excluded (not associated) values from a list, I usually do it with aggr function like this:

Aggr(Column, Column)

But now I need to do it for a calculated dimension, my dimension is :

If(isnull(ColumnB)=0, ColumnA)

I tried

Aggr(If(isnull(ColumnB)=0, ColumnA) , If(isnull(ColumnB)=0, ColumnA) )


But It's not working, any recommendation?


Thanks

Tags (2)
9 Replies

Re: Hide excluded with Aggr & if isnull in qlik sense

How about this?

Aggr(Only({<ColumnB = {'0'}>} ColumnA) , Only({<ColumnB = {'0'}>} ColumnA))


Life is so rich, and we need to respect to the life !!!
arixooo123
Contributor

Re: Hide excluded with Aggr & if isnull in qlik sense

Thanks Anil,

Are you sure it's doing the same thing? I used isnull function to make sure I filtered out all the rows in which ColumnB is null. is equal to {'0'} doing the same?

Re: Hide excluded with Aggr & if isnull in qlik sense

Those are thinking only not real one.. May be this?

=Aggr(Only({($ -<ColumnB={'*'}>)>} ColumnA),Only({($ -<ColumnB={'*'}>)>} ColumnA))

Or


Create field in script and i am sure, this will return same..

If(isnull(ColumnB)=0, 'Y', 'N') as FieldName


And the use Expression like below

Aggr(Only({<FieldName = {'Y'}>} ColumnA) , Only({<FieldName = {'Y'}>} ColumnA))


Life is so rich, and we need to respect to the life !!!

Re: Hide excluded with Aggr & if isnull in qlik sense

As a calculated Dimiension you have to use this (Isnull() function returns -1 if there is null for true)

If( isnull(ColumnB) =  -1, ColumnA)

Aggr(If(isnull(ColumnB) = -1, ColumnA) , If(isnull(ColumnB) = -1, ColumnA) )

arixooo123
Contributor

Re: Hide excluded with Aggr & if isnull in qlik sense

I want to exclude null values. anyway, if you read my question you'll see that's not my question.

arixooo123
Contributor

Re: Hide excluded with Aggr & if isnull in qlik sense

I tried both solutions, When I write the expression it's ok, but in dashboard it says invalid dimension and shows nothing

Re: Hide excluded with Aggr & if isnull in qlik sense

Great, Will you able to provide sample?

Life is so rich, and we need to respect to the life !!!
arixooo123
Contributor

Re: Hide excluded with Aggr & if isnull in qlik sense

not sure how to do that, my app is about 1 GB. Don't know how to create a small sample in qlik sense

Re: Hide excluded with Aggr & if isnull in qlik sense

I GB is really vast, Don't know how can we offer you.

1) Create 10 rows inline and then use same formula and share with us to look

2) Create few null rows and normal rows the state same

Life is so rich, and we need to respect to the life !!!
Community Browser