Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
arixooo123
Creator III
Creator III

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

9 Replies
Anil_Babu_Samineni

How about this?

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


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
arixooo123
Creator III
Creator III
Author

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?

Anil_Babu_Samineni

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))


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

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
Creator III
Creator III
Author

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

arixooo123
Creator III
Creator III
Author

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

Anil_Babu_Samineni

Great, Will you able to provide sample?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
arixooo123
Creator III
Creator III
Author

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

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful