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: 
sunainapawar
Creator
Creator

Total Sales in a Block chart

Hello,

We need to calculate the Market Share Percentage of one company with respect to other companies in Block chart. I used the below expression but its not working fine.

sum(sales)/sum(total sales)

I also tried using ALL instead of total, but that is also not working. 

Please help to suggest any solution. Thanks in advance. 

 

Labels (1)
3 Replies
lorenzoconforti
Specialist II
Specialist II

Can you post your qvf or an example to understand better the requirement? Or maybe even some screenshots

sunainapawar
Creator
Creator
Author

Hi,

Yes , i have attached the screenshot.  We need to calculate the Market Share of each companies with all other companies.i., sales of each company/total sales of each companies. I also tried the below expression,it dint work.

sum(sales)/sum({<company_name={"*"}>}total sales).

We also tried to aggregated it by Fyear, it dint work.

sum(sales)/aggr(sum(sales),Fyear))

Please help. Thanks in advance.

 

 

lorenzoconforti
Specialist II
Specialist II

I'm guessing the sum of the percentages is not equal to 100%?

 

What if you try to create a simple table just to check your calculation is working correctly?

One dimension (company) and 3 measures (sum sales, sum total sales and percentage)