Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculating %ages from and expressioin

Hi all,

i have an equation where Sales of shop = (A+b)/C

how can i get the percentage of the sales of each shop using the above equation ?

6 Replies
vishsaggi
Champion III
Champion III

Can you share a sample app and expected output you are looking for?

Not applicable
Author

Can u elaborate it more

eromiyasimon
Creator II
Creator II

go to number tab and enable the percentage option for that expression

hemanthaanichet
Creator III
Creator III

Can you say it little bit clear??

This is my purely guess iam not sure whether is this your requirement

dimension : shop names

expression: ((sum({<fieldname={'A'}>}sales) + sum({<fieldname={'B'}>}sales) )/ sum({<fieldname={'C'}>}sales))*100

jonathandienst
Partner - Champion III
Partner - Champion III

Your requirements are a little vague, but lets assume that you want % sales by shop in a table / chart and A, b, C are fields in your data model:

Use shop (name / code  or ID number) as the dimension (lets assume ShopName).

Use the expression  

=Sum(Aggr((Sum(A) + Sum(b)) / Sum(C), ShopName)) / Sum(TOTAL Aggr((Sum(A) + Sum(b)) / Sum(C), ShopName))

Adjust the field names to your requirements.

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

If everything is well associated then:

Sum(A)+Sum(B)/Sum(C)

A,B,C are ur attributes..