Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Xijamk
New Contributor

Sum TOTAL with TOP N

Hi!, sorry for my bad english, I have a chart to display the top 5 VALOR_FIJO per FILIAL, but i need an expression to display the sum(total <FILIAL> NUM_CANTIDAD), but is always filtered for the top 5 of VALOR_FIJO, i've tried sum({<VALOR_FIJO=>} total <FILIAL> NUM_CANTIDAD) without success.

Pivot Table :

Dimension 1 : Filial

Dimension 2 : =aggr(if(rank(sum(NUM_IMPORTE_TOTAL_MAPA_CONTRATO))<=5,VALOR_FIJO),VALOR_FIJO)

Expression : SUM({<VALOR_FIJO=>} TOTAL <FILIAL> NUM_CANTIDAD)

1.png

The chart is displaying 24807, but the real number is 61196.

24807 is the total of the VALOR_FIJO displaying.

VALOR_FIJOSUM(NUM_CANTIDAD)
0.008907
287.007708
71.504336
120.002363
196.001493

TOTAL : 24807

I can get the real value if i remove the <FILIAL> from the expression : sum({<VALOR_FIJO=>} total NUM_CANTIDAD)

But if I filter more than 1 FILIAL, I get the full total, and not the total of each FILIAL.

Any ideas of how can i achieve this?

Thanks!

Tags (2)
1 Solution

Accepted Solutions

Re: Sum TOTAL with TOP N

6 Replies

Re: Sum TOTAL with TOP N

Would you be able to share your app to try out few things?

Highlighted
Xijamk
New Contributor

Re: Sum TOTAL with TOP N

App shared

Re: Sum TOTAL with TOP N

Does this look right?

Capture.PNG

Xijamk
New Contributor

Re: Sum TOTAL with TOP N

Thanks, that fixed the problem, but now i figured out that if you have selected just one FILIAL, you can see 5 values for that FILIAL, but if you have selected many FILIAL, you can't see 5 values per FILIAL!

Re: Sum TOTAL with TOP N

Xijamk
New Contributor

Re: Sum TOTAL with TOP N

PERFECT!, thanks you very much!, it was driving me crazy.