Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Noobie question

I have one expression which says Sum (tot_engasjem)-Sum (Volum)

This expression is labeled Unyttet. This one works just fine.

Then secondly I want have that as an percentage and I have an expression which is

Sum (Unyttet)/Sum (TOTAL(Unyttet))

That only yields empthy cells.

Labels (1)
7 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can't perform aggregation on named columns (Unyttet) in a chart or table. You will need to do something like this:

Sum(Aggr(Sum((tot_engasjem)-Sum(Volum)), dim1, dim2, ...)) /

Sum(Total Aggr(Sum((tot_engasjem)-Sum(Volum)), dim1, dim2, ...))

Where dim1, dim2, ... is a comma seprated list of all the fields used as dimensions on your chart/table.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi

Since I only have one dimension called Klasse, the expression should look something like this?

Sum(Aggr(Sum((tot_engasjem)-Sum(Volum)), Klasse)) /

Sum(Total Aggr(Sum((tot_engasjem)-Sum(Volum)), Klasse))

However this yields only -  

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

=Sum ([Unyttet])/(Sum (TOTAL tot_engasjem)-Sum (TOTAL Volum))

OR

=Sum ([Unyttet])/Sum (TOTAL [Unyttet])

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Sorry but neither of those seem to work. I still get just a - .

jagan
Partner - Champion III
Partner - Champion III

HI,

Can you attach sample file that you are working.

Regards,

Jagan.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I thnk there is a bracket out of place. Try this:

Sum(Aggr(Sum((tot_engasjem)-Sum(Volum)), Klasse)) / Sum(Total Aggr(Sum(tot_engasjem)-Sum(Volum), Klasse))

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

And if that is still not right, you could try other positions for the total:

Sum(Aggr(Sum((tot_engasjem)-Sum(Volum)), Klasse)) / Sum(Aggr(Sum(Total tot_engasjem)-Sum(Total Volum), Klasse))

 

Sum(Aggr(Sum((tot_engasjem)-Sum(Volum)), Klasse)) / Sum(Total Aggr(Sum(tot_engasjem-Volum), Klasse))

 

Sum(Aggr(Sum((tot_engasjem)-Sum(Volum)), Klasse)) / Sum(Aggr(Sum(Total tot_engasjem-Volum), Klasse))

Can't be sure as I am guessing in the absence of a sample model to test on.

Jonathan

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