Hello
I need your professional aid in turn.
Who can tell me how I can improve the following M code if this is possible?
Thank you in advance for the help.
Please Login or Register to view this content.
Hello
I need your professional aid in turn.
Who can tell me how I can improve the following M code if this is possible?
Thank you in advance for the help.
Please Login or Register to view this content.
Last edited by Ivan-; 11-19-2023 at 08:04 AM.
Improve in what way? What is wrong with it?
For non-German speakers, this means 'and so on up to 200'.Please Login or Register to view this content.
There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.
A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Hello
Thank you for your quick reply.
My M code works great, there are no fel reports.
I thought there would be a way to improve this code or to show off.
Somehow reduce all the additional columns through split, which I can't do.
Would this be possible if so how?
See post #2 and attach an annotated workbook.
Example file is now added
I think there will be a much easier way, but please explain the objective - I don't get the logic of the results you're aiming for.
Does this formula do what you want?
=SEQUENCE(200,,Tabelle2[@Datum]+Tabelle2[@Uhrzeit],29.5)
=SEQUENZ(200;;Tabelle2[@Datum]+Tabelle2[@Uhrzeit];29,5)
Hello
Thank you for your formula.
Your formula provides the desired end result, but unfortunately I would like to implement this with PQ because it should also be partially running on older versions.
Not sure I fully understand I made this query that will create a list of 200 values with 29 days and 12 hrs in between
i'm sure this can be incorporated into your actual sheet made to fit. but this code the first line creates the 200 values in a split second. I used "hardcoded" start time because that is easiestPlease Login or Register to view this content.
Last edited by Roel Jongman; 11-19-2023 at 02:41 PM.
Hello
Thanks too for the help.
Unfortunately, the date is hard -corded in the code, this is not desired.
The date must be controllable via the table and does not change the M code every time.
Well let's try this code then
i could not get the code to work before due to some naming issues that caused confusion with me..
so I changed the query "Tabelle2" to "qryTabelle2" to avoid confusion between what is the actual table in worksheet "Tabelle1" and the qeury in which you merged date and time column.
also changed the columnname from +29 Days to "29 Days" as that +-sing gave issues in the reference
Only change is in the 29agelist line replaced the hardcoded date/time into a reference of the first datarow of column 29 days in the query qryTabelle2Please Login or Register to view this content.
which is this part
qryTabelle2{0}[29 Days]
also see attached file.
be aware that Abfrage is now broken because of the name change of the column +29 days
Last edited by Roel Jongman; 11-19-2023 at 04:00 PM.
Hello
Many love for the PQ solution.
Unfortunately, due to time constraints, I cannot test the whole thing in the original file.
If it doesn't work, I'll get in touch again.
I thank all helpers again.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks