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.
You're welcome !
good luck
Thanks
May i know the reason its showing the field Group that containing only Group3.
its taking for all only Group3.
Load *,
if([Vehicle Number]<100,'Group1',if([Vehicle Number]>100 and [Vehicle Number]<300,'Group2','Group3')) as Group;
SND:
LOAD
[Carrier Name] AS [Transporter Name],
// Datums &'|'&[Carrier Code]&'|'&[Vehicle Number] as UnitKey,
[Vehicle Group],
[Vehicle Number],
VehicleTrips
FROM
[D:\Proje
table is Sheet1);
Can you attach your app ?
otherwise it can be caused by many things.. we should see.
be sure you don't have filters activated.
Sure Youssef,
Thanks for your support. Please find the attached application. In that i should show the rating for the transporter based on the no.of vehicles and more kms travelled.
Thanks in advance.
Hi,
here I think you should make a group by.
you are making comparison on the field Vehicle number which is not a number, it is a char..
what is the red part ?
Hi,
No need to consider that Red.
Thanks Youssef,
Then how to write this one in the script level.
if([Vehicle Number]<100,'Group1',if([Vehicle Number]>100 and [Vehicle Number]<300,'Group2','Group3')) as Group;
The expression you mentiondd above won't work. You need an aggregation function like COUNT. And before you need to clean you field to remove the red part.
Sure I will remove that.
try to remove it on the script and make Group calculation on the expressions
remove the red part on the script with this:
SubField([Vehicle Number],'(',-1) as [Vehicle Number]