Generate Rows issue..
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello all,
I did use Generate Rows before and it worked just fine, this time I am having this issue and not sure how to fix it.. here is my example:
I want to have another Row for 2017:06:22 17:00:21.. Not sure why it is not doing it.. this is how my Generate Rows tool properties look like:
I appreciate your thoughts on this..
Rawan
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This might work for you (it will work, but is it what you want?) and is worth a try:
Change your initialization to find the hour that the min starts:
datetimetrim([min],"Hours")
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks so much for suggesting this, it does work for our reporting purposes. I really appreciate your help..
Rawan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MarqueeCrew's answer is excellent as always. I'm not sure what happens if your Min and Max times extend into different days so another possible approach is an condition expression like
DateTimeDiff([Hourly],[Max],"hours") < 1
Iain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for responding to my question.. in my data, there will not be a case where Min and Max dates extend into different days, I actually look at Min and Max for each user on a daily basis. but with that said, I wanted to try your approach to understand how it will be different, and interestingly, the workflow generated an extra row for each case and I am not sure why, here is how it looks with @MarqueeCrew 's approach:
and here how it looks using your approach:
it added an extra row for the hour 18:00:00. do you know why would it do this?
Thanks
Rawan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sorry for the delay in getting back to you - real life intruded
I had set my condition expression to force the extra row because I thought that was what was required.
See attached for a simpler example based on your data.
In the first GenerateRows tool I am using the original logic. I have added additional variables so that you can see the results of the generation process (initialize variable, write row, loop to set next value of variable, if condition is True repeat from write row). You will see in the example that after the second row is written the next value is such that the condition will return False so the third row is not written.
In the second GenerateRows tool you'll see that after the second row is written the next value is such that the condition will return True so therefor the third row will be written.
Cheers,
Iain
