Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
gembreda
Contributor II
Contributor II

(Sub)Totals for column of only the values >0

Hi all,

I would like to get some help on the following issue:

In one of our reports I used a formula to get the difference between column A and B (If( - > 0.019, - , null() ) ). In our report I want the total sum of each column. Qlikview gives us result 1 but we want result...

Could someone please help me solve our problem? We want totals for every Department and every Company as well.

CompanyDepartmentPositionABA-B (if >0)B-A (if >0)
QTEastManager

1

1
Advisor422
Consultant321
Assistant242
Result 1Total of East1091
Result 2Total of East I would like to see10932

1 Solution

Accepted Solutions
gembreda
Contributor II
Contributor II
Author

Thanks to your answers I was able to get the desired result. I used the expressions below:

Column A:          = SUM(num(round(Formatieplaats.Formatiegrootte/36,0.01),'#0,000'))

Column B:          = sum(num(round(aggr(num($(xBezetting)

Column - : =sum(if((num(round(num((Formatieplaats.Formatiegrootte)/36,'#0,00'),0.01)- (round(aggr(num($(xB...

Column - : =sum(if((num(round(num((Formatieplaats.Formatiegrootte)/36,'#0,00'),0.01)-(round(aggr(num($(xBezet...

-(num(round(num((Formatieplaats.Formatiegrootte)/36,'#0,00'),0.01)-(round(aggr(num($(xBezetting)/36,'#0,00'),[Formatieplaats]),0.01)),'#0,00')),null()))

View solution in original post

10 Replies
Not applicable

Hi,

Try using Pivot Table to get column wise Sub Totals.

Best of luck

sujeetsingh
Master III
Master III

Gam just go to

Properties<<<<<Expression<<<<

on Expression tab there is Total Mode and check the last option and select by drop down what you want sum,count,avg etc of rows.

Hope this help

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

use dimensionality ( )  function.,may be solve  ur problems

Regards

Perumal A

gembreda
Contributor II
Contributor II
Author

Thanks for your answer. I did put the data in a pivot table but this did not change the way the total is calculated.

Do you have another option?

I tried to use the option via expressions etc, but the 'total modus' is greyed out.Can not find a setting that changes this.

gembreda
Contributor II
Contributor II
Author

I found out that your solution works if I select a straight table. In our case we need to use a pivot table.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Try these - I am not sure if you need the inner sum or not):

Sum(Aggr(If( - > 0.019, - ), Company, Department, Position))

or

Sum(Aggr(Sum(If( - > 0.019, - )), Company, Department, Position))

This assumes that Company, Department and Position are the pivot table dimensions.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
er_mohit
Master II
Master II

departmentpositionsum(A)sum(B)SUM(If(->0.019,-,NULL()))SUM(If(->0.019,-,NULL()))
EASTadvisor4220

assistant2402

consultant3210

manager1100

Total10932

use position & department as dimension and then  in presentation choose partial sum on position and use expression as given above of column header...

hope this help you.....

Not applicable

USE IT, HOPE IT HELP YOU.

firstly use PIVOT TABLE.

step1--here department and position are dimension.

step 2-- select presentation then select position then select partial sum

step 3---sum(A) , sum(B) and other two columns are expressions.

departmentpositionsum(A)sum(B)SUM(If(->0.019,-,NULL()))SUM(If(->0.019,-,NULL()))
EASTadvisor4220
assistant2402
consultant3210
manager1100

Total10932
sujeetsingh
Master III
Master III

budyy.. I changed according to you in your sample and it worked..Totals are visible there

And I am not able to send any images right now..else i might have shon you