Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with exactly all P() values

Hi, I have the following table:

SEMENTEAREASACAS/HÁ
SEM 1150
SEM 1260
SEM 1365
SEM 1461
SEM 1558
SEM 1666
SEM 1770
SEM 1856
SEM 1979
SEM 11065
SEM 2350
SEM 2666
SEM 2774
SEM 2850
SEM 21063
SEM 3168
SEM 3266
SEM 3365
SEM 3464
SEM 3575
SEM 3659
SEM 3751
SEM 3853
SEM 3959
SEM 31055
SEM 4356
SEM 4466
SEM 4567
SEM 4661
SEM 4763
SEM 4868
SEM 4966
SEM 41065
SEM 5164
SEM 5375
SEM 5663
SEM 5859
SEM 5955

and I have to show the "SEMENTES" where I have exactly all possible values from "AREA" when I select one of this "SEMENTES"

Ex: When I select the "SEM 2" I have to show the "SEM 1", "SEM 2", "SEM 3" and "SEM 4".

now i'm using the following set analysis:

Avg({<AREA=P(AREACOMP)>} [SACAS/HÁ])

but it's returning the "SEM 5" too.

Someone have an idea to solve my problem?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Tis expressions works, if I got the request right:

Avg({<AREA=P(AREACOMP),
SEMENTE={"=count(distinct AREACOMP)=count({<AREA=P(AREACOMP)>} total<SEMENTE> AREA)"}>} [SACAS/HÁ])

View solution in original post

6 Replies
Not applicable
Author

Hi Chintia

area 3,6,8 are in Sem 2 and Sem 5, so is it not right that sem 5 is in there?

Just to clarify, when you select sem 2, the possible area is 3,6,7,8,10 and you want your calculation to work on all of those areas, regardless of semetes right? That looks to be happening, so I'm not sure what the issue is

Joe

sunny_talwar

I think what he wants is since Sem 2 has 3, 6, 7, 8, 10 then  only those Sem's which have all these area's should be shown. Sem 5 only has 3, 6, 8 and don't have 7 & 10 so it should be shown. That's what I interpreted from him post.

Best,

S

Not applicable
Author

relating tables

Anonymous
Not applicable
Author

Tis expressions works, if I got the request right:

Avg({<AREA=P(AREACOMP),
SEMENTE={"=count(distinct AREACOMP)=count({<AREA=P(AREACOMP)>} total<SEMENTE> AREA)"}>} [SACAS/HÁ])

Not applicable
Author

Correct friend sunindia

Not applicable
Author

worked!! Thank you Michel!!