Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Intersection Set Analisis

   hi!,

I have a problem with set analisis,

I need to find the intersection of two field (type text) of two diferent tables, i tried with  {< INTERVALO1 *= INTERVALO2 >}

Please Help me!,

Thanks

1 Solution

Accepted Solutions
swuehl
Not applicable

Re: Intersection Set Analisis

Sorry, I don't get what you mean.

I see that your definition in the two tables for HORA_MIN_FOR and TPOXHORA seems to be different (shifted about a constant value) when looking at the same HORA_MIN, but I would suggest to fix this in the data model, not in chart expressions.

9 Replies
swuehl
Not applicable

Re: Intersection Set Analisis

This probably only works when you have an active selection in INTERVAL02, try

{< INTERVALO1 *= p(INTERVALO2) >}

instead.

If possible, post some sample lines of data (e.g. in a sample qvw file) togehter with your requested outcome.

Regards,

Stefan

Not applicable

Re: Intersection Set Analisis

The line is:

=SUM({< TPOXHORA *= HORA_MIN_FOR, [SERVICIO FORECASTEADO]={"HFC TECNICO","HFC COMERCIAL"} >} [HH REQ. ACD FORECAST])

but is bad.

The data is,

HORA_MIN_FOR          TPOXHORA

00:00                              00:00

00:30                              01:00

01:00                              02:00

01:30                              03:00

02:00                              04:00

02:30                              05:00

03:00                              06:00

03:30                              07:00

04:00                              08:00

04:30                              09:00

Two fields are type text.

swuehl
Not applicable

Re: Intersection Set Analisis

So, I assume you have tried using the p() function. Any success?

Not applicable

Re: Intersection Set Analisis

No, i tried with p() but the result is 0

swuehl
Not applicable

Re: Intersection Set Analisis

Seems to work for me, please check attached sample (or adapt if it deviates from your model).

Not applicable

Re: Intersection Set Analisis

swuehl,

I tried with the sample qvw  but for my exercise not result.

attached my qvw with data.

thanks!

swuehl
Not applicable

Re: Intersection Set Analisis

Ok, your tables are linked (I assumed non-linked fields) and there seems to be no possible selection that results in  HORA_MIN_FOR and TPOXHORA having same values, so an itersection returns no records.

If you tell us what you want to achieve in general, maybe we can come up with a different solution.

Not applicable

Re: Intersection Set Analisis

I want SUM the field [HH REQ. ACD FORECAST] and show in a table the result but one column use HORA_MIN= 08:30 and the second column use HORA_MIN = 08:00 for that i think intersection between TPOXHORA and HORA_MIN_FOR so the column with HORA_MIN is ok,

swuehl
Not applicable

Re: Intersection Set Analisis

Sorry, I don't get what you mean.

I see that your definition in the two tables for HORA_MIN_FOR and TPOXHORA seems to be different (shifted about a constant value) when looking at the same HORA_MIN, but I would suggest to fix this in the data model, not in chart expressions.