Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
lessassy
Creator
Creator

How can i diuplay total in straight table with null values

Hello Qlik community,

 

I have a straight table which have 7 columns and 8 lines.

My interest is regarding the line result which is financial value (in €).

There are some null values forsome lines (3 or 4).

And i want to display the total of the fiancial result in straight table but I can't do it even if i have activated the total in presentation tabl because there are null values for some lines.

Anyone know how to bypass this issue ?

Thanks a lot 

 

 

Labels (2)
1 Solution

Accepted Solutions
johnca
Specialist
Specialist

What do you get if you select "Sum of Rows" in the "Total Mode" section?

 

Sum of Rows.png

View solution in original post

7 Replies
nisha_rai
Creator II
Creator II

Hi,

Can you please share the Screenshot and Sample data.

lessassy
Creator
Creator
Author

Hello,

 

Table.PNG

It's the column at the right.

There are some null values '-' but the total at the bottom doesn't appear

The set anaylis is the one hightlight in blue int the last expression

table_3.PNG

If i do a sum (expression) i get not null values but zero values

table_4.PNG

table_5.PNG

jonathandienst
Partner - Champion III
Partner - Champion III

Null values should not prevent the total from appearing, unless you are using the expression total and you have a naked field* in your expression. This field would evaluate to null, so the total will be null. Either wrap the naked field in some sort of aggregation, use a Sum(Aggr()) structure or change to Sum of Rows total.

 

*a naked field is a field not enclosed in an aggregation function (like Min(), Sum(), Count()....). When there is more than one possible value in the context where the expression is being evaluated, the naked field will evaluate to null. So it may work at the row level, but not at the total level.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
lessassy
Creator
Creator
Author

It's working when i use aggr function.

But i can't see the total when i use an 'if ' statement.

I want to be able to display the 'zero' cell into 'N/A'

 

When i use this expression:

Aggr(if(sum([Avct_TF12-Fin]) > 0, sum([Avct_TF12-Fin]), 'N/A'),COD_KPI_CDG)

i still get no totalQlik help.PNG

nisha_rai
Creator II
Creator II

Hi,

Can you try Sum(Aggr(if(sum([Avct_TF12-Fin]) > 0, sum([Avct_TF12-Fin]), 0),COD_KPI_CDG))

May it helps

johnca
Specialist
Specialist

What do you get if you select "Sum of Rows" in the "Total Mode" section?

 

Sum of Rows.png

lessassy
Creator
Creator
Author

Thank you prrobel solved !