Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
Slowly getting to grips with Qlikview and it seems that a lot of the 'manipulations' are done within the loading script or expressions. I wonder if there is another way to go about doing subtotals / groups.
I have a dimension called "Result" and I want to show all the values of "Result" but I also want to show subtotals within the variable.
For example, the results might be..(please excuse the footballing example!)
Result Count of Result
Goal 4
Offside 6
Penalty 2
Foul 12
Throw in 9
Corner 7
But in my table (and probably a chart as well) I would like to show "Free Kicks" as the sum of Offside, Penalty and Foul and "Restart" as the sum of Throws and corner, plus a total for all results
Goal 4
Offside 6
Penalty 2
Foul 12
Free Kick 20
Throw in 9
Corner 7
Restart 16
All results 40
Any advice on this and also any pointers on where to look for very basic guides to expressions, sorting, grouping etc would be very gratefully received
Many thanks
Hi,
An easy movement for your example is create a variable or a field in the script with the sum of the 3 fields.
Regards
Thank you for your reply but I am very new to Qlikview so I am not sure what that means!!
More than 1 solution is possible.
You can add an inline table in your script and add the Result to that table and a main category.
Result field will match in your datamodel based on the name.
Then create a pivot in QlikView and set Partial sum on the new field.
Grouped:
LOAD * INLINE [
Result, Group
Goal, Free kick
Offside, Free kick
Throw in, Restart
];
etc.
Hi Paul,
Alternatively you can use Pivot table which enable you to generate partial sums. You will have to create one mapping column to link
Goal 4
Offside 6
Penalty 2
Foul 12
with Free Kick and other two with restart. You can enable show partial sum at the column in Presentation tab to get the desired result.
I am using real and sensitive data so sadly i cant upload
Hi,
The solutions of our partners are right. Try this.
Regards,
This seems like what I am looking for! Although how do I add a mapping column?
On another note, is there anywhere I can find examples of full scripts which include the load and other functions such as Groups, Cross Table (and any other popular tasks I suppose)
Hi Paul,
Look this http://community.qlik.com/docs/DOC-5791
Hi again,
Try this.
Regards.