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: 
jvargasmayorga
Contributor III
Contributor III

Sum TOTAL by column

Hello community.
I have the following query. I am looking to show the total of a calculation in a column.
As you can see in the image I have the column "Year" and "Month", then I have the value of "Fuga" for which I use the following formula

Sum({$<Cod_Estado_Pasaje = {4}>} Cantidad_Transito)

Then in the value of "transito" I want to place the TOTAL of the "fuga" column, for which I use the following formula:

Sum({$<Cod_Estado_Pasaje = {4}>} TOTAL Cantidad_Transito)

But it is adding the total of everything selected, for example it is showing me the total of "Sep" and "Oct" 5637 + 5574 = 11,211


What I need is that in the column of "transit" "Sep" only the value of 5637 is shown

 

jvargasmayorga_0-1640194095988.png


I hope you have let me understand, and I hope you can tell me how to do it

Thanks

Jose

1 Solution

Accepted Solutions
jvargasmayorga
Contributor III
Contributor III
Author

Community, I found the solution, I kept looking for information in this forum. My formula was like this:


Sum({$<Cod_Estado_Pasaje = {4}>} TOTAL <Hora,Mes> Cantidad_Transito)

 

"Hora" and "Mes" are my dimensions.

 

REgards.

Jose

View solution in original post

3 Replies
anat
Master
Master

aggr(Sum({$<Month=p(Month),Cod_Estado_Pasaje = {4}>} Cantidad_Transito),Month)

jvargasmayorga
Contributor III
Contributor III
Author

Thanks for your answer.
Use the formula that you indicated, the correct value of the total is shown, but only to the value of one dimension, my dimension is "Hour" and it is only shown in the value of "00:00". I would like it to be shown in all rows, already that this value is going to be used to get the% of "Fugas".
I hope you can help me

jvargasmayorga_0-1640204191152.png

 

jvargasmayorga
Contributor III
Contributor III
Author

Community, I found the solution, I kept looking for information in this forum. My formula was like this:


Sum({$<Cod_Estado_Pasaje = {4}>} TOTAL <Hora,Mes> Cantidad_Transito)

 

"Hora" and "Mes" are my dimensions.

 

REgards.

Jose