Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I need to create a tabular chart on the mentioned below format.
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!
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;
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
Can be done in 2 charts:
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!
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;
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
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?
Thank you!!
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*');