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

How to get region totals

I have the following chart:

Pagamentos - Município - Meso - Micro.png

For example, CABEDELO belongs to MESOREGIAO='ZONA DA MATA PARAIBANA' and MICROREGIAO='JOAO PESSOA'. I would like to get totals for the corresponding MESOREGIAO and MICROREGIAO.  The expressions run fine only when I select a MESOREGIAO or MICROREGIAO. Here are the expressions:

SUM(total {<MESOREGIAO={'$(=MESOREGIAO)'},MICROREGIAO=,MUNICIPIO=>}[VALOR PAGTO])

SUM(total {<MICROREGIAO={'$(=MICROREGIAO)'},MESOREGIAO=,MUNICIPIO=>}[VALOR PAGTO])

How can I build these expressions without the need to filter these metadata?

Regards,

Paulo

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Extremely Sorry !!! Not really understand still. My luck is

SUM(TOTAL <MESOREGIAO> {<MUNICIPIO=>}[VALOR PAGTO])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

5 Replies
Anil_Babu_Samineni

Do you mean this?

SUM(TOTAL {<MICROREGIAO={'ZONA DA MATA PARAIBANA', 'JOAO PESSOA'},MUNICIPIO=>}[VALOR PAGTO])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulo_costa_ifp
Contributor II
Contributor II
Author

No, Anil.

I would like to build the expression without the need to fix a constant for MICROREGIAO, MESOREGIAO. Based on MUNICIPIO , it would consider totals only for the  corresponding MESOREGIAO and MICROREGIAO, in separate columns.

Do you understand what I mean?

Regards,

Paulo

Anil_Babu_Samineni

But, Field = Field ??? What you are going to try here? My assumption is this?

SUM(TOTAL {<MICROREGIAO={"=CABEDELO = MICROREGIAO"},MUNICIPIO=>}[VALOR PAGTO])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulo_costa_ifp
Contributor II
Contributor II
Author

My expression is wrong, I know. As MUNICIPIO appears in one line, how could I know (dinamically) the total for the corresponding MICROREGIAO and MESOREGIAO (two new columns).

Do you understand me?

Anil_Babu_Samineni

Extremely Sorry !!! Not really understand still. My luck is

SUM(TOTAL <MESOREGIAO> {<MUNICIPIO=>}[VALOR PAGTO])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful