Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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.

View solution in original post

9 Replies
swuehl
Champion III
Champion III

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
Author

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
Champion III
Champion III

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

Not applicable
Author

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

swuehl
Champion III
Champion III

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

Not applicable
Author

swuehl,

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

attached my qvw with data.

thanks!

swuehl
Champion III
Champion III

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
Author

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
Champion III
Champion III

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.