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: 
rcandeo
Creator III
Creator III

why the final total doesn't work?

I have this application attached that has a test with aggregation. This test is to show only values wich amount be bigger than a variable (that is filled with 10.000).

In the line detais it works, but in the final total, the amount didn't considered the aggregation test.

Someone can help me how can I have this final total correct?

14 Replies
rcandeo
Creator III
Creator III
Author

Sorry John, you were right. It worked and I simplified the expression a little bit:

sum(aggr(if(sum(aggr(Valor_Bruto,Filial,Codigo_Fornecedor,Nota))>Valor_Minimo

,sum(aggr(Valor_Bruto,Filial,Codigo_Fornecedor,Nota)),0)

,UM_NF,Fornecedor,Codigo_Fornecedor,CNPJ_CPF,BancoAgencia

,CodigoBancoAgencia,ContaBancaria,Item_Descricao1))



Can you help me doing the same thing in the chart "Detalhes Bancos - Relatório de Madeiras"?

I' ve tried this expression but it didn't worked. The idea is to show an amount only when the aggregation is bigger than the variable Valor_Minimo, but when printing a value, it must be detailed as using sum(Valor_Bruto)

sum(aggr(if(sum(aggr(Valor_Bruto,Filial,Codigo_Fornecedor,Nota))>Valor_Minimo

,sum(aggr(Valor_Bruto,Filial,Codigo_Fornecedor,Nota)),0)

,UM_NF,Fornecedor,Codigo_Fornecedor,CNPJ_CPF,BancoAgencia

,CodigoBancoAgencia,ContaBancaria,Item_Descricao1))



johnw
Champion III
Champion III

I'm very unclear what you want, but maybe you're asking for this?

if(dimensionality()<3
,sum(Valor_Bruto)
,your original "Valor Bruto" expression here)

rcandeo
Creator III
Creator III
Author

Thank you John for continue trying to help me.

Unfortunately it's not that.

For the line totals it works, but I need to show in the detail lines the sum of individual Valor_Bruto, but only when the aggregation of the lines that will result in the next line total is bigger than the variable Valor_Minimo.

I've made me clear now please?

amien
Specialist
Specialist

"If you want the "sum of rows" in a pivot table, you have to do it by sum(aggr(expression,dimensions))."

Thanks for that John .. BTW new picture? 🙂

johnw
Champion III
Champion III


Amien wrote:BTW new picture? 🙂


Yep. The previous picture was about a year and a half old, so I figured it was time for a new one.