Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can anyone please help to write the backend code for this scenario?
I have table which is having the stores and sales. I need to divide three groups.
Group1 is 0-100 sales, Group2 is 100-300 sales, above 300 sales - Group3.
How many vehicles having for each group.
I need to show group1 stores and groip2 and group3 stores in the list box and pie chart.
Thanks in advance.
Please find attached,
Hi,
there is a lot of methods to do it, here is one example:
Sales_table:
Load
.
.
if(sales>=0 and sales<=100,'Group1', if(number>=100 and sales <=300,'Group2', if(sales>300,'Group3'))) as Group
FROM
Thanks for your help. Can you please provide another scenario.
When am clicking on the transporter name. it should display that group name (1,2 or 3).
and there are Three list boxes Group1,Group2, Group3 It should the transporter names.
there are three Groups. The transporter is having the 0-100 fleets
that transporter will comes under the Group1, like this group2-100-300 fleets, above 300fleets- Group3
How many vehicles having for each group.
This one i have given in my front end. Like this can i write in the backend.
=IF(Count(DISTINCT [Vehicle Number])<=100, 'Group1',
IF(Count(DISTINCT [Vehicle Number])>100 and Count(DISTINCT [Vehicle Number])<=300,'Group2',
IF(Count(DISTINCT [Vehicle Number])>300, 'Group3')))
Can you please attach sample data ?
Thanks for your help
Sample Data.
TransName | Fleets |
ABC | 20 |
DEF | 102 |
GHI | 50 |
JKL | 202 |
MNO | 350 |
PQR | 400 |
STU | 450 |
ABC and GHI comes under Group1, DEF, JKL comes under Group2, MNO, PQR, STU comes under Group3.
Can i generate new fields for all these groups separately.
Please find attached
Many Thanks Youssef,
I need to show count of group1 transnames etc..
Group1 - 2
Group2- 2
Group3 - 3
Please find attached,
Thank you so much Youssef.