Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Purushothaman
Partner
Partner

Tabular Chart Requirement

Hi Experts,

I need to create a tabular chart on the mentioned below format.

Purushothaman_0-1651628462693.png

 

Below is my dataset. Anyone, Please help me me on this requirement.

Car Sales Quantity
Benz 47889 658
Benz 25673 748
Audi 58975 654
Audi 51748 236
Rolls Royce 65745 258
Rolls Royce 85968 123
Mazada 87415 189
Mazada 41758 637
Toyota 91457 974
Toyota 89657 658
Hyundai 65812 587
Hyundai 36974 588
Honda 45874 493
Honda 36547 211
Fiat 32145 274
Fiat 54321 481

 

Thank you!

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Create the groupings in your script

 


Main:
Load * inline [
Car,Sales,Quantity
Benz,47889,658
Benz,25673,748
Audi,58975,654
Audi,51748,236
Rolls Royce,65745,258
Rolls Royce,85968,123
Mazada,87415,189
Mazada,41758,637
Toyota,91457,974
Toyota,89657,658
Hyundai,65812,587
Hyundai,36974,588
Honda,45874,493
Honda,36547,211
Fiat,32145,274
Fiat,54321,481
];

DisplayGroup:
Load Distinct Car as Car, 'Eur Cars' as D_Car , 1 as d_sort_order
Resident Main
Where WildMatch(Car,'Benz','Audi','Rolls*');
Concatenate(DisplayGroup)
Load Distinct Car as Car, Car as D_Car , WildMatch(Car,'Benz','Audi','Rolls*')+1 as d_sort_order
Resident Main
Where WildMatch(Car,'Benz','Audi','Rolls*');
Load Distinct Car as Car
,'Other Cars' as D_Car , 5 as d_sort_order
Resident Main
where Not WildMatch(Car,'Benz','Audi','Rolls*');
Concatenate(DisplayGroup)
Load Distinct Car as Car
,Car as D_Car , AutoNumber(Car)+5 as d_sort_order
Resident Main
where Not WildMatch(Car,'Benz','Audi','Rolls*');
exit Script;

 

qlikCommunity1.PNG

 

Sorting: Sort by expression  = d_sort_order

 

background color expression = 

=if(wildmatch(D_Car,'*cars'),Lightgray())

 

Also disable Totals for your measures, i haven't in the above screenshot

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

5 Replies
Lisa_P
Employee
Employee

Can be done in 2 charts:

Lisa_P_0-1651629825776.png

 

Purushothaman
Partner
Partner
Author

Thanks Lisa for your suggestion. My client requirement is to go for a Single Tabular Chart.  Can you please help me on that.

Thank you!

vinieme12
Champion III
Champion III

Create the groupings in your script

 


Main:
Load * inline [
Car,Sales,Quantity
Benz,47889,658
Benz,25673,748
Audi,58975,654
Audi,51748,236
Rolls Royce,65745,258
Rolls Royce,85968,123
Mazada,87415,189
Mazada,41758,637
Toyota,91457,974
Toyota,89657,658
Hyundai,65812,587
Hyundai,36974,588
Honda,45874,493
Honda,36547,211
Fiat,32145,274
Fiat,54321,481
];

DisplayGroup:
Load Distinct Car as Car, 'Eur Cars' as D_Car , 1 as d_sort_order
Resident Main
Where WildMatch(Car,'Benz','Audi','Rolls*');
Concatenate(DisplayGroup)
Load Distinct Car as Car, Car as D_Car , WildMatch(Car,'Benz','Audi','Rolls*')+1 as d_sort_order
Resident Main
Where WildMatch(Car,'Benz','Audi','Rolls*');
Load Distinct Car as Car
,'Other Cars' as D_Car , 5 as d_sort_order
Resident Main
where Not WildMatch(Car,'Benz','Audi','Rolls*');
Concatenate(DisplayGroup)
Load Distinct Car as Car
,Car as D_Car , AutoNumber(Car)+5 as d_sort_order
Resident Main
where Not WildMatch(Car,'Benz','Audi','Rolls*');
exit Script;

 

qlikCommunity1.PNG

 

Sorting: Sort by expression  = d_sort_order

 

background color expression = 

=if(wildmatch(D_Car,'*cars'),Lightgray())

 

Also disable Totals for your measures, i haven't in the above screenshot

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Purushothaman
Partner
Partner
Author

Hi @vinieme12 ,

Thanks for your help. Your Script and measures are working well. Thank you for solving the problem. I have one concern, I don't want to Group "Eur Cars" . How to remove that?

Purushothaman_0-1651641806199.png

 

Thank you!!

vinieme12
Champion III
Champion III

just remove the grouping from the below table

DisplayGroup:
Load Distinct Car as Car, Car as D_Car , WildMatch(Car,'Benz','Audi','Rolls*') as d_sort_order
Resident Main
Where WildMatch(Car,'Benz','Audi','Rolls*');
Load Distinct Car as Car
,'Other Cars' as D_Car , 4 as d_sort_order
Resident Main
where Not WildMatch(Car,'Benz','Audi','Rolls*');
Concatenate(DisplayGroup)
Load Distinct Car as Car
,Car as D_Car , AutoNumber(Car)+4 as d_sort_order
Resident Main
where Not WildMatch(Car,'Benz','Audi','Rolls*');

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.