Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

macaulay
Contributor

Combine two fields to dimension for filtering

Hi all together,

I have two fields "Datum" and "Erlös_Datum" that I would like to combine to one dimension, as the content is the same (dates). Without combinations the two dimensions would be =Year([Datum_Erlös]) and =Year(Datum). Is there a possibility to build a single dimension out of these two?

Thanks for the help and best regards,

Tom

Tags (3)
1 Solution

Accepted Solutions
digvijay
Honored Contributor III

Re: Combine two fields to dimension for filtering

You may need canonical calendar, see if this helps -

Canonical Date

7 Replies
YoussefBelloum
Esteemed Contributor

Re: Combine two fields to dimension for filtering

Hi,

what do you mean by combining two dimension?

concatenate them in one field like this: 2017-2017 for example ?

macaulay
Contributor

Re: Combine two fields to dimension for filtering

Let's say my two sources look like this.

One.JPG

Two.JPG

I want to set one filter, where I can filter the month or year. For me it doens't work (I have no explanation why, but that's another question) to rename "Datum_Erlös" to "Datum" in the script.

omarbensalem
Esteemed Contributor

Re: Combine two fields to dimension for filtering

Create a master calendar.

YoussefBelloum
Esteemed Contributor

Re: Combine two fields to dimension for filtering

to rename this field in the script:

TABLE:

LOAD

fieldA,

fieldB,

DATUM_ERLOS as DATUM,

.

.

FROM...

to filter the field DATUM (date) using it month you should make sure that this field is recognized as a date.

did you try Month(DATUM) to see what it gives ?

macaulay
Contributor

Re: Combine two fields to dimension for filtering

Yes I tried doing this, and it works when I do it without the rest of the data. But when all data is loaded and when I filter after month(Datum), there is no more data shown for my revenue. I actually too unaware of Qlik to know why this happens, so I am looking for another way to manage this problem.

YoussefBelloum
Esteemed Contributor

Re: Combine two fields to dimension for filtering

you should maybe attach some screen shots of your model ? attach sample data ? or the app ?

digvijay
Honored Contributor III

Re: Combine two fields to dimension for filtering

You may need canonical calendar, see if this helps -

Canonical Date