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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Total in an expression

Hi, QV

I have one problem that I don't know he solution.

I am seeing if you can figure it out.

I have this dataset. I have information of number of invoices for every category and company.

CompanyCategoriesNo. of invoices
1000Intercompany42787
1000Scanned17894
1100Emailed PDF3773
1100Scanned12608


I want to know e.g.

How many invoices in percentage are scanned for company 1000 of total invoices for company 1000.

The answer I am looking for is:

Scanned Invoices for company 1000/ Total Invoices for company 1000 = 17894/60681 = 29,4%

I tried to use this formula: =Sum([Number of invoices])/Sum(Total [Number of invoices])

But it does not give me the right answer because in the formula: Sum(Total [Number of invoices]

I get all the invoices.

1 Solution

Accepted Solutions
Kushal_Chawda

Use below expression

=Sum([Number of invoices])/Sum(Total <Company>[Number of invoices] )

View solution in original post

4 Replies
sunny_talwar

Try this:

=Sum([Number of invoices] & Company)/Sum(Total <Company> [Number of invoices] & Company)


Capture.PNG

Kushal_Chawda

Use below expression

=Sum([Number of invoices])/Sum(Total <Company>[Number of invoices] )

Colin-Albert
Partner - Champion
Partner - Champion

You need to specify the company dimension in your TOTAL expression

  Sum([Number of invoices])/Sum(Total <Company> [Number of invoices])


Use this in a chart with Company as a dimension

maxgro
MVP
MVP

replace

Sum([Number of invoices])/Sum(Total [Number of invoices])


with

Sum([Number of invoices])/Sum(Total  <Company> [Number of invoices])

because you want the total at the Company level