Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
a34
Contributor
Contributor

For each loop in expression

I have a dataset which has name, date and values.

I want the result as attached in the sample data excel. 

The formula for result is for the first time it's 1*(value1+1) - for 2nd iteration it's --> result * (value2 +1) - for 3rd iteration it's --> result * (value3 + 1) and so on.

Thanks

1 Solution

Accepted Solutions
Saravanan_Desingh

Try this,

tab1:
LOAD *, Alt(Peek(Result),1)*(Values+1) As Result;
LOAD Name, 
     Date, 
     Values 
FROM
[D:\HereDownloads\Sample data (2).xlsx]
(ooxml, embedded labels, table is Sheet1);

commQV21.PNG

View solution in original post

2 Replies
Saravanan_Desingh

Try this,

tab1:
LOAD *, Alt(Peek(Result),1)*(Values+1) As Result;
LOAD Name, 
     Date, 
     Values 
FROM
[D:\HereDownloads\Sample data (2).xlsx]
(ooxml, embedded labels, table is Sheet1);

commQV21.PNG

a34
Contributor
Contributor
Author

Thanks Saravanan, works like charm.