Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
martina_ag
Contributor II
Contributor II

Straight table total not respect row rules

I'm using a straight table (see below) that calculate 4 measure: contract_value, SIL, P.O. (=contract_value - sil), P.O._v2 where the minus 0 differences are replaced with 0.

 

This are the formulas I used:

P.O = CONTRACT_VALUE - SIL

P.O._V2 = if ( [IMPORTO CONTRATTO (C)]-SIL < '0' ,'0',[IMPORTO CONTRATTO (C)]-SIL)

 

As you can see, for each row the measure P.O._v2 is right, but the column Total does not work (is the the same of P.O. column).

Someone has an idea of what I could do to fix it?

 

martina_ag_0-1737032619315.png

martina_ag_1-1737032623671.png

 

Labels (5)
1 Solution

Accepted Solutions
igoralcantara
Partner Ambassador/MVP
Partner Ambassador/MVP

The issue is because the default behavior of totals in straight tables in Qlik aggregates the column values directly (e.g., sums them up) instead of recalculating the expression logic for the total row.

To fix this, you need to adjust your P.O._V2 expression properties.

igoralcantara_0-1737034486623.png

 




IPC Global: ipc-global.com
Check out my latest posts at datavoyagers.net

View solution in original post

2 Replies
igoralcantara
Partner Ambassador/MVP
Partner Ambassador/MVP

The issue is because the default behavior of totals in straight tables in Qlik aggregates the column values directly (e.g., sums them up) instead of recalculating the expression logic for the total row.

To fix this, you need to adjust your P.O._V2 expression properties.

igoralcantara_0-1737034486623.png

 




IPC Global: ipc-global.com
Check out my latest posts at datavoyagers.net
martina_ag
Contributor II
Contributor II
Author

Thank you so much!!!