Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I am trying to make a variable in the load script but there are errors so I'm not sure if it is possible. I would like to make a variable that is the sum of Items from a year range.
Load:
Items,
Sum(Items where Year 2000 >= =< 2005 from excel file) as Range,
Location,
cost,
Year
From Excel File;
you have to use a group by.
Can you share a sample data to share the exact answer?
Hi Lisa,
Please create a variable (say: vRentableArea) from Setting--> Variable Overview and set default value as 0.
Then write below the script to get the sum of field values and rename as name of the variable vRentableArea.
RentableArea:
LOAD
sum([Rentable Area (SqFt)]) As vRentableArea
FROM [..\Data\Report B.xls](biff, embedded labels) WHERE [Event Year Group] = '2020';
Let vRentableArea = Peek('vRentableArea',0,'vRentableArea');
Now load the script again and you can have the vRentableArea variable with expected value at front end.
Hope this will be a helpful solution.
Thanks
Mousumi
Lisa, did the last posters suggestion work for you? If so, do not forget to return to your thread here and use the Accept as Solution button on that post to give them credit for the help and let other Members know that it worked. If you did something different, consider posting that and once posted, use the button to mark that to close out the thread. If you are still needing something, please leave an update.
Regards,
Brett