Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
maartenmol
Contributor
Contributor

Qlikview - Table chart per month %

My script is the following:

sum({1< TypeofFact= {'Lawyer'}
[Year] = {$(vThisyear)}
>}_total_value)

This gives the following output:

QV question.PNG

How can i make the second pivot table?

 

6 Replies
Frank_Hartmann
Master II
Master II

try this as expression:

sum(aggr(sum(Data)/aggr(NODISTINCT sum(Data),Date),Lawyer,Date))

Replace Data and Date  Field according your environment

maartenmol
Contributor
Contributor
Author

Dear Frank,

this looks perfectly for the months. Thanks for the info.

Only the total at the end is still incorrect.

It summarises all the months (until July):

Network:      361%

Free choice 339%

Total               700%   (7 months x 10)%)

Frank_Hartmann
Master II
Master II

what happens if you also  activate "showPartialSum" for your Date dimension?

jfkinspari
Partner - Specialist
Partner - Specialist

Unless I'm overlooking something, it seems overkill to use AGGR function, as you can just use the TOTAL keyword to specify the scope of the calculation.

Frank_Hartmann
Master II
Master II

have a look at the attached sample.

Both TOTALS should be displayed correct!

hope this helps.

Brett_Bleess
Former Employee
Former Employee

Did the example app Frank provided work?  If so, be sure to give him credit by clicking the Accept as Soluiton button on his post.  If not, please provide further information, so we can try to help you get things figured out.  If you are unable to click the button for some reason, you can also just reply that it did work, and we can be sure things get updated accordingly.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.