Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Subtotals at Buttom are not correct

Hi,

I have enable the Subtotals at buttom checkpoint, but the totals are wrong.

You can see that the sums are incorrect. How can I fix it?

I have the same problem with the same table but showing percentages.

Please advise.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum(Aggr(Count({$<AutoID = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -13)"}>} DISTINCT AutoID), Type, YRMON))

View solution in original post

8 Replies
marcus_sommer

It will depend on your expression if a normal partial sum could return the right respectively your expected results. Quite probably will be an aggr-function needed for it - something like this one:

sum(aggr(YourUsedExpressions, YearMonth, MaybeFurtherDimensions))

- Marcus

Anonymous
Not applicable
Author

I am using the following:

=Count({$<AutoID = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -13)"}>} DISTINCT AutoID)

But I am not understanding these totals.

sunny_talwar

What are your chart dimensions?

Anonymous
Not applicable
Author

Type and YRMON, I have 3 types so I need them as rows, and year-month as columns.

sunny_talwar

Try this:

Sum(Aggr(Count({$<AutoID = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -13)"}>} DISTINCT AutoID), Type, YRMON))

Anonymous
Not applicable
Author

That worked for one of my charts, but for another chart I have a problem with my percentage chart:

I make the change to use something similar:

=Sum(Aggr(Count({$<AutoID = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -13)"}>} DISTINCT AutoID), [EE Type], YRMON))
/
Count({$<AutoID = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -13)"}, [EE Type]=>} TOTAL <YRMON> distinct AutoID)

But it should stay on 100% and it's more than that as you can see. How can I fix it?

sunny_talwar

Try this:

=Sum(Aggr(Count({$<AutoID = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -13)"}>} DISTINCTAutoID), [EE Type], YRMON))
/ Sum(TOTAL<YRMON> Aggr(Count({$<AutoID = {"=Date#(YRMON, 'YYYY-MM') > MonthStart(Today(), -13)"}, [EE Type]=>}  distinct AutoID), [EE Type], YRMON))

Anonymous
Not applicable
Author

That worked too!!!!

Thanks