Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 2 table from there i want to calculate divisio of 2 values to find out #.
Table 1 :
KPI Code
Booking id as Repeat Booking Id
where repeat booking =Y
Table 2:
KPI Code
Booking Id as Total Booking
now i want for same KPI code Repeat Booking /Total Booking
kindly suggest the way to fulfill the same.
Try like:
Table1:
load
KPI Code,
Booking id as Repeat Booking Id From<>
where repeat booking =Y
Join
Table 2:
load
KPI Code,
Booking Id as Total Booking From <>:
Final:
load *,
[Repeat Booking] /[Total Booking] as DivResult
Resident Table1;
Drop Table Table1;
my code is like below:
Repeat_ArriverAll:
load 14 AS [KPICode],
[Financial Year],
[Period Code],
KeepChar([Period Code],'1234567890') AS [New Period Code],
[Village Code] as [Channel Type Name],
[Count] as [Repeat Count]
Resident ArrivalRepeatvisit;
join
load 14 AS [KPICode],
[Financial Year],
[Period Code],
KeepChar([Period Code],'1234567890') AS [New Period Code],
[Village Code] as [Channel Type Name],
[Count] as [Total Count]
Resident ArrivalAll;
Repeat_Arriver%:
LOAD *,
NUM([Repeat Count ]/[Total Count],'#,##0.00%') as Count
RESIDENT Repeat_ArriverAll;
DROP TABLE Repeat_ArriverAll;
while running this code as suggested by you it showing an error that Repeat Count field don't found.
Can you post Error screen OR Try this, I just deleted space
Repeat_Arriver%:
LOAD *,
NUM([Repeat Count]/[Total Count],'#,##0.00%') as Count
RESIDENT Repeat_ArriverAll;
instead of
Repeat_Arriver%:
LOAD *,
NUM([Repeat Count ]/[Total Count],'#,##0.00%') as Count
RESIDENT Repeat_ArriverAll;