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: 
mphekin12
Specialist
Specialist

Columns Not Adding Correctly

Hello,

I have a quick question that I'm hoping the community can help me with.  Attached is a screen shot of a table that I exported to Excel.  If you add the columns in the 'Current' column, the total at the bottom of that column is NOT correct.  I manually added the 'Should Be' column to show what the total should be.  Is there a reason this table is behaving like this?

Any information would be greatly appreciated!

12 Replies
Nicole-Smith

The problem would be stemming from how you have your expression written, but without knowing anything about your chart, it's impossible to tell what it is exactly.

Or, if you're using a straight table, you can change the total from Expression Total to Sum of Rows:

mphekin12
Specialist
Specialist
Author

Nicole,

I already did what you suggested to get the number right within the Straight Table.  Now the issue that I have is that I need that total outside of the Straight Table and they aren't matching.  Any ideas?

maxgro
MVP
MVP

perhaps you have to uncheck "Suppress when value is null" in dimension tab and/or "Suppress missing" / "Suppress 0 values" in presentation tab

Nicole-Smith

What do you mean outside of the straight table?  In a text box?  If that's the case, you'll need to tell me your dimensions and expression.

mphekin12
Specialist
Specialist
Author

Nicole,

That is correct.  I am going to need that number for a formula that is in a text box.  It looks like all of the columns aren't adding correctly.  If you look at the screen shot, column B is just a simple Total Sales column, although I am using Comparative Analysis.  Here is the formula:

({$<Year=Group1::Year, Month=Group1::Month, Quarter=Group1::Quarter, Date=Group1::Date>} Price_Ext)

Any ideas?

Thank you so much!

mphekin12
Specialist
Specialist
Author

Massimo,

I don't believe that Null values have anything to do with the issue, but thanks for your input.

Nicole-Smith

You probably need to use aggr() in the text box and include the dimensions you have on the chart, so you're final formula should look like this:

sum(aggr(sum({$<Year=Group1::Year, Month=Group1::Month, Quarter=Group1::Quarter, Date=Group1::Date>} Price_Ext), TheFirstDimensionOnYourChart,TheSecondDimensionOnYourChart,etc.))

mphekin12
Specialist
Specialist
Author

Nicole,

I tried using aggr() and I was getting the same results.

Thank you for your suggestions!

Nicole-Smith

If you can post a .qvw file, I may be able to help you out more...