Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Text Object Total Does not Match from Straight Table

Hello!

Could someone figure out why my total in Text object does not match with my straight table( this is  the correct total 105.8M) ?... I used a set analysis as I'm going to concatenate this with my final qvw...I don't have any issues the total value in my other Aspect item except for this  'Open PO'...I was thinking of the total mode selections like in staright table but can't find this in text object..

Anyway, I have attached the file for better understanding.

Pls. enlighten me on this..

Tks.

1 Solution

Accepted Solutions
Nicole-Smith

=money(sum(aggr(sum({<Aspect={'Open PO'}>}distinct [Total Value]),[Base Material],MFR,MPN,[Due Date],[STD Price],[PO Value],Qty)))

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hi cacosta35,


Because there are multiple Due Dates for each base/mfr/mpn and you are summing distinct values, you will need to use the aggr() function to get the correct total.  Try the following expression:

     =money(sum(aggr(sum(DISTINCT{<Aspect={'Open PO'}>}[Total Value]),[Due Date])))

Regards,

Sean

Nicole-Smith

=money(sum(aggr(sum({<Aspect={'Open PO'}>}distinct [Total Value]),[Base Material],MFR,MPN,[Due Date],[STD Price],[PO Value],Qty)))

Anonymous
Not applicable
Author

The results are different because the expressions are different.  There is "distinct" in the table but not in the text box.

I didn't check the logic, but sum(distinct ...) is a dangerous thing.  Make sure that you really need it.

Anonymous
Not applicable
Author

Thank you, Nicole...I got it it right...

Anonymous
Not applicable
Author

Thank you, Sean...Actually, there's one field (MFR or MPN ) that is missing to get the correct value..