- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How can I find the result without looping?
For example, the number of piles according to the height value greater than 63:
This heap number refers to: when the number of adjacent rows is more than 63 consecutively, the count is 1, so the count should be 8.
The result can be obtained in a circular way, please ask if there are other ways to get the result. Thanks!
This post originally written in Chinese (Simplified) and has been translated for your convenience. When you reply, it will also be translated back to Chinese (Simplified).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: 如何能不用循环的方式求出结果?
Maybe something like this:
If(Row() == 1, cur_val = 1);
If(:height > 63 & Lag(:height) <= 63,
cur_val
++);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: 如何能不用循环的方式求出结果?
Sum(:height[Index(1,Row()-1)]<=63&:height[Index(2,Row())]>63)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How can I get the result without looping?
When the amount of data is large, the time-consuming methods of the two experts are quite different. Thanks again!
This post originally written in Chinese (Simplified) and has been translated for your convenience. When you reply, it will also be translated back to Chinese (Simplified).