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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Znda5
Partner - Contributor
Partner - Contributor

Filter on a created dimension

Hi everyone! I need your help to solve my problem. 

I have a table with population data, such as neighborhood, postal code, etc.. and I made a new table that is not joined to the first one and has all this "dimensions" in one unique column---> 

Dimension_Unidad:
LOAD * Inline [
DimensionUnidad
"1. Auzoa/Barrio",
"2. Unitate Txikia / Unidad Menor"
"3. Barrutia / Distrito"
"4. Atala / Sección"
"5. Posta-Kodea/Código Postal"
];

so that I can use it in a filter. The problem came when I made a "chart table"  where if I select for example in the filter  "1. Auzoa/Barrio" the column of the table shows me all the neighbourhoods, and I made this with:

If(GetFieldSelections(DimensionUnidad)='2. Unitate Txikia / Unidad Menor', [Unidad Menor.des_cas],
If(GetFieldSelections(DimensionUnidad)='3. Barrutia / Distrito', [3. Barrutia / Distrito],
If(GetFieldSelections(DimensionUnidad)='4. Atala / Sección', [4. Atala / Sección],
If(GetFieldSelections(DimensionUnidad)='5. Posta-Kodea/Código Postal', [5. Posta-Kodea/Código Postal],
If(GetFieldSelections(DimensionUnidad)='1. Auzoa/Barrio', [Barrios.des_cas],[Barrios.des_cas]


)
)
)
)
)

 

In other column I have calculated the population so when I select something in the filter it works properly! But the problem is when I dont select anything. It's suppose to give me the population filtered by "[Barrios.des_cas]" but it gives me the sum of the population in all the selections, that means population in  [Unidad Menor.des_cas] +population in [3. Barrutia / Distrito]+population  in [4. Atala / Sección]+...

the formula of population that I used is: count(id)  where each person has a different id. Thank you so much!

 

 

0 Replies