Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
reivax31
Partner - Creator III
Partner - Creator III

How to merge 2 dimensions

Hi Qlikers,

I'm trying to find a way to merge 2 dimensions based on 2 conditions. For this I'm using Wildmatch but it doesn't work yet....

I have 2 dimensions [Dimension1] and [Dimension2]

[Dimension1]        [Dimension2]

CAT                       OTHER

CAT                       OTHER

CAT                       OTHER

OTHER                 OTHER

OTHER                 CAT

OTHER                 OTHER

...

if(wildmatch([Dimension1],'CAT'),'CAT',if(wildmatch([Dimension2],'CAT'),'CAT','OTHER')) .... But it doesn't work.

Any idea how I can merge this in the front end?

Thanks for your support!

1 Solution

Accepted Solutions
reivax31
Partner - Creator III
Partner - Creator III
Author

Hi, I think it is just not possible to do what I want in dimensions. Because if I select my block "CAT" in the treemap, it will automaticaly trigger the 2 filters ([Dimension1] & [Dimension2]). And there is no logical way to filter on both to do what I want. I guess I will have to change all my measures in each graph by counting all the fields with 'CAT'. Or I have to add a conversion table to make it work...

View solution in original post

11 Replies
vikasmahajan

you can give  [Dimension1] & '-' & [Dimension2]

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Anonymous
Not applicable

may be this:



if(wildmatch([Dimension1],'CAT'),'CAT', if(wildmatch([Dimension2],'CAT'),'CAT','OTHER') ,'OTHER')

Not applicable

Hi,

maybe try this

if([Dimension1] = 'CAT' or [Dimension2] = 'CAT', [Dimension1] & [Dimension2], 'OTHER')

or this

if(WildMatch([Dimension1], 'CAT') or WildMatch([Dimension2], 'CAT'), [Dimension1] & [Dimension2], 'OTHER')

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi Xavier,

Can you tell me your expected output.

If you want  [Dimension2] into [Dimension1]

Like This??

PFA .......

reivax31
Partner - Creator III
Partner - Creator III
Author

Hi Qlikers,

Thanks for your quick answers. I tried all the solution you proposed but it doesn't do what I want. What happens is that it will filter on my first dimension1 so every thing that is not 'CAT' is automaticaly excluded. So I don't see my 'CAT' in Dimenson2...

[Dimension1]        [Dimension2]

CAT                       OTHER

CAT                       OTHER

CAT                       OTHER

OTHER                 OTHER

OTHER                 CAT

OTHER                 OTHER

The expected result is to have a Treemap with 1bloc "CAT" and one bloc "OTHER".

let me know if something is not clear.

Thanks

reivax31
Partner - Creator III
Partner - Creator III
Author

Hi,

I'm using Qlik Sense with .qvf files and not .qvw..

Xavier

Kushal_Chawda

try below

=if(match([Dimension1],'CAT'),'CAT',if(match([Dimension2],'CAT'),'CAT','OTHER'))

Not applicable

Where are you trying to match it? In Calculated dimension or in Expression?

reivax31
Partner - Creator III
Partner - Creator III
Author

I'm trying to do in calculated dimension.