Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Do a relative sum for each unit

hi

i did a bar graf and put a measure sum(time) and mark relative ( to see the precent type from the total)

if i choose one unit it work ok.

but when i choose two unit,  it takes the sum total(time)of the two units together and then present the  precent type ,which is wrong .

i need it to consider each unit and it's sum .

is there is a way ?

i attached photo

thank you

4 Replies
swuehl
MVP
MVP

Instead of checking the relative box, try using an expression like

=sum(time) / sum(TOTAL<unit> time)

if unit is the dimension you are using for your units.

Not applicable
Author

hi

the unit is the one of the dimension  (unit, type).

sorry but i did not uderstand the syntax ?

swuehl
MVP
MVP

Please check the HELP, sum() function and TOTAL qualifier with field list.

Not applicable
Author

sorry you were right , i looked in the help  for TOTAL but i did not find.

it was under SUM.

thank you