Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Excluding the value from a dimension

Imagine North,East,South and West are the area and A,B,C and are the groups which are there in each of the area. What I want to do is I want to exclude B group only from the East area. Rest of the area can have all the groups. I want to do this filteration at the dimension level.

Could you please help me out!

I wrote the below code to to exclude East from the Area. I don't know what is the code I have to write to exclude B Group only in East Area

=if(Area<>'East',Area)

----------------- Data for your understanding -----------------



Area

North

East

South

West

Group

A

B

C

D

13 Replies
Not applicable
Author

load *

<from table >

where Group <>'B';

Not applicable
Author

Thanks Surender

But I don't want to do that at script level. Do you have anyother suggestion other than doing at the script level.

Not applicable
Author

if you want to do it in the chart level u should use

if(Group <>'B',Area) as dimension. Also make sure u supress null values for this dimension on the chart.

Not applicable
Author

I already tried that but it is incorrect.

The code which you have given will exclude Group:B from all the Areas. Where as I want to exclude Group:B only from East(Area).

Its tricky right!!!

Not applicable
Author

Please use

if(Group <>'B' and Area <>'East' ,Area)

here the codition has to fullfill both the conditions and will produce the desired output.

Please do le me know if it helps

Not applicable
Author

Sorry Surender you are wrong again.

Area<>East will exlude East from the Area. Where as I don't want to do that.

I just want to Exclude Group B one and only from Group called East. In short A,C,D groups can be there in East but B should not be there in East(Only in East).

Very tricky isn't? I am also trying this from long time

Not applicable
Author

Pls send me the qv doc..

Not applicable
Author

Hi Surender

As requested attached you the doc. Hope it will be easy now for you.

Not applicable
Author

Hi,

The following expression should resolve the issue:


=IF(Area='East' AND Group='B',Null(),Group)


The document is also attached.

Cheers,

Haneesh