Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Team,
I have a requirement to create a new field which calculates sum of week vs Prev week.See the below image for reference.
This field has to be create in script level only not in UI level.
Can any one please help me to create 'Expected output' field.Requirement is urgent.
Thanks in advance.
Regards,
Anusha
hi
this will create the calculated column
dataTemp:
LOAD
[Date],
[Sales]
FROM [lib://AttachedFiles/Sample Data.xlsx]
(ooxml, embedded labels, table is Sheet1);
data:
load *,
if(isnull(Previous([Sales])),[Sales], [Sales]+Previous([Sales])) as [Expected Output]
Resident dataTemp
Order by [Date];
drop Table dataTemp;
Thanks for your response @lironbaram . Followed your steps but the numbers are getting doubled instead of adding to previous week the values are getting doubled.
hi
it's strange , it is working for me perfectly
can you share your app , you used
or your load script
@lironbaram I have more fields .In sample file i given only two fields but i have 7 fields in table may be because of more fields i am getting double records.
Thanks in advance.