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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

% calculation in a straight table

Hi, I am trying to calculate the % breakout per the yellow highlight in the screenshot below in a straight table. Can anyone help please?

Thanks.

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

it should, just change the field after the TOTAL clause in the denominator to the field that represents the subtotal.

change:

=sum(if(Dataset='Recent',Revenue))/ sum( TOTAL <Segment_Classification> if(Dataset='Recent',Revenue) )


to:


=sum(if(Dataset='Recent',Revenue))/ sum( TOTAL <BU> if(Dataset='Recent',Revenue) )

View solution in original post

19 Replies
JonnyPoole
Former Employee
Former Employee

try hitting  the 'relative' checkbox on the expressions tab of the chart properties.  it will render the values as percent of total

Anonymous
Not applicable
Author

Sorry, this is what i am trying to achieve.

Thanks

Anonymous
Not applicable
Author

Hi, thanks. Relative works but i am trying to get to achieve this. The % rates are off if I use relative.

Thanks again.

JonnyPoole
Former Employee
Former Employee

no problem.  to get a % subtotal you would want the following expression.  Then format to a % on the number tab.

sum( [Total Revenue]) / sum( total <Group> [Total Revenue])

Anonymous
Not applicable
Author

I am getting nulls...

JonnyPoole
Former Employee
Former Employee

Can you open this example ?

Anonymous
Not applicable
Author

I am using personal edition....

JonnyPoole
Former Employee
Former Employee

If you have PE , then please upload your QVW or a sample QVW and i will tweak the expressions.  I will copy/paste the expressions and any other tweaks to get it to work so that you can manually apply to your own QVW. sound good ?

Anonymous
Not applicable
Author

Hi I am having a hard time attaching the qvw, might have been a little big. I thought it was uploaded but I am not able to see it. Can you see it?

Thanks,