# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for
Did you mean:
Contributor II

## How to get region totals

I have the following chart:

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

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

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
5 Replies

Do you mean this?

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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

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

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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?

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

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Community Browser