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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

% of total

Hello All

I need to show % of Total,i  mean if suppose my data is like this(thinking to show either in straight table or pviot table)

rawmaterialname  suppiler    no.of lots

hydrogensulphate   birla           10

hydrogensulphate   l&t             20

hydrogensulphate   hzl            30

sulphate                birla          30

sulphate                kun            50

sulphate                nav             60



now,In my straight table or pivot table i need a column with %of total

dimensions :rawmaterial,suppiler

Table:

rawmaterialname   suppiler    %of total

hydrogensulphate  birla        i need some thing  like this(10/60)

hydrogensulphate  l&t           20/60

.

.

sulphate               birla           30/140

sulphate                kun            50/140

so please help me with expression what should i need to write down in that column....will be any change whether i display it either in straight table or pivot table


thanks

naveen

1 Solution

Accepted Solutions
sfatoux72
Partner - Specialist
Partner - Specialist

You add two things on your expression, but only on the first sum???

  • MATNR linked to a [Raw Materials Name]
    • I replace it by [Raw Materials Name]={"*"}
    • I add it to the second sum too
  • ENSTEHDAT
    • I don't know what it is,  I removed it
    • If you want to add it, add it in both sum

Try something like that :

=sum({$<[Raw Materials Name]={"*"}>}PRUEFLOS) / SUM({$<[Raw Materials Name]={"*"}>}TOTAL <[Raw Materials Name]>PRUEFLOS)

View solution in original post

32 Replies
sunny_talwar

Try this:

Sum([no.of lots])/Sum(TOTAL <rawmaterialname> [no.of lots])

kunkumnaveen
Specialist
Specialist
Author

Hello Sunny ,thanks for very quick reply ,every thing is working fine expect the the final total well if everything is 100% obsivouly the final total has to be 100% am i right ,i there any option to remove Total only to that particular column please find the attachment

thank naveen 

sunny_talwar

I don't see any attachments

sfatoux72
Partner - Specialist
Partner - Specialist

On expression tab, select your expression and modify this option to remove Total for this column

2016-02-08 22_56_00-Qlik Community_204813.png

Not applicable

Can't you just use the relative % tick box in a straight table to give you what you want

Capture.PNG

kkkumar82
Specialist III
Specialist III

Hi Sunny ,

Will the expression you gave will give the expected by naveen ??

I tried but getting differently.

Thanks

Kiran Kumar

jonathandienst
Partner - Champion III
Partner - Champion III

That option will be % of the total data set. I think the OP wants it by raw material. Sunny has that right.

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

Isn't this is what is needed?

Capture.PNG

kkkumar82
Specialist III
Specialist III

All,

I earlier tried like this to get what naveen wants

Sum([no.of lots])

/

Max(aggr( NODISTINCT Sum([no.of lots]),rawmaterialname))

thanks

Kiran Kumar