Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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

6 Replies
its_anandrjs

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

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