Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ashokunbi
Contributor III
Contributor III

Grand Total Columns for expressions

I have two expressions, one for sum and one for avg that is displayed in columns under each selected week from list table (number of columns change depending on the number of weeks selected. I would like to add grand total columns for the sum and avg expression as the last two columns. My problem is that when I created the grand total expression it's being displayed for each week with wrong data of course. Any help will be appreciated.

1 Solution

Accepted Solutions
neelamsaroha157
Specialist II
Specialist II

Hey Ade,

Its been marked correct by you.

Capture2.PNG

View solution in original post

10 Replies
neelamsaroha157
Specialist II
Specialist II

You can create your expression as

If(columnNo() = 0, then 'Avg Expression' , 'Your_Original_Expression')

This will give your Total as Avg and wont display for each week.

Anil_Babu_Samineni

Like this

Sum( total Sum + avg)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
saimahasan
Partner - Creator III
Partner - Creator III

Since its pivot, it should take the grand total when selecting the partial totals option.

I dont know whether i am taking you correct or not. but i think you are asking for something like this...Untitled.png

ashokunbi
Contributor III
Contributor III
Author

Thanks. Sorry for the late response. Been away for a while. This displayed for each week as well with the same result I already had.

ashokunbi
Contributor III
Contributor III
Author

Thanks. Sorry for late response, been away for a while. You are correct but number of weeks is not static. Number weeks selected depends on the user but expression will calculate for number of weeks selected. See example below.

   

Week Number Of YearW29 2016W29 2016W33 2016W33 2016W34 2016W34 2016Selected WksSelected Wks
Group NameNameGradeTechnologyUnitsASPUnitsASPUnitsASPTotal UnitsAvg ASP
ABCABC-1CGSM--1$5.00--??
ABCABC-1CGSM8$4.887$5.00--??
ABCABC-1DGSM15$4.35----??
ABCABC-2CGSM3$4.881$5.00--??
ABCABC-2CGSM3$4.88----??
ashokunbi
Contributor III
Contributor III
Author

Not sure why this is marked as correct answer because it is not. Please remove correct designation as it would prevent others from actually answering the questions.

sunny_talwar

You should be able to remove the correct response yourself. Check here:

Qlik Community Tip: Marking Replies as Correct or HelpfulQlik Community Tip: Marking Replies as Correct or Helpful

The above link shows how to unmark the correct answer as well

sunny_talwar

I think what saimahasan‌ provided is what you would need. Go to the presentation tab and try selecting enabling 'Show Partial Sum' for your Week Number of Year dimension and no matter how many weeks you have, the end result will be the just one column for each of your expression. Give it a try as there is no cost of trying in QlikView.

Best,

Sunny

neelamsaroha157
Specialist II
Specialist II

Hey Ade,

Its been marked correct by you.

Capture2.PNG