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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
kushalthakral
Creator III
Creator III

Trellis pie chat with conditions

Dear All

i need to create a trellis pie chart for the data below:

one more column is company

so i need to calculate for particular company all models in trellis based on year

YearModelSales
2009A300
2009B400
2010A200
2010B100
2011A355
2011B200

i am using expression like

=sum({<[Company]={X}>}ModelCount)/sum(Total {<FinancialYear,[Vehicle Type]={X}>} ModelCount)

Regards

Kushal

Labels (1)
6 Replies
its_anandrjs
Champion III
Champion III

You have to calculate like

=Count( {<[Company]={'X'}>} Model ) / Count(Total {<FinancialYear=,[Vehicle Type]={'X'}>} Model)

kushalthakral
Creator III
Creator III
Author

Hi Anand

But ModelCount is my field name and i m counting in Script itself

can you tell me the sample expression if we gave two conditions in sum for Trellis

its_anandrjs
Champion III
Champion III

If ModelCount is a field then it will ok but in second script FinancialYear is a field if so then use it like FinancialYear= for bypass because you cant use it like FinancialYear

But try to check that it is working script


=sum({<[Company]={'X'}>}ModelCount) / sum(Total {<FinancialYear=,[Vehicle Type]={'X'}>} ModelCount)



kushalthakral
Creator III
Creator III
Author

i have tried but it is not working

Can u plz help me in achieving that

Not applicable

Hi

Did u want to achieve somewhat like this.

kushalthakral
Creator III
Creator III
Author

Hi all

Thanks for ur support

i have found out the solution