Forum Discussion
Create Column as List of Values using M
- 6 years ago
Hi rsbin
you're nearly there!
You have to make an adjustment in the red area:
= Table.AddColumn(Source, "ListofDates", each Date.DatesBetween([Contract Start Date],[Contract Expiration Date],"Month"))
That has to match the name of the query/function where you've posted my code. "." will not be allowed in query names, so it must be something else 🙂
Hi rsbin ,
you can use this function to create the months between your date fields: https://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-power-query/
Please check out this video on how to use such a function code in Power Query:
Reuse M code (M functions) created by others easily
Thank you both for the replies. I will study them over the weekend and let you know