Forum Discussion
List.Generate too slow
Hi everyone,
I have a table with the contracts of all customers, where I have the start date and end of these contracts.
I'm using List. Generate to repeat the month-to-month dates to be able to relate to my calendar table and compare month to month with my recipe.
But that way is too heavy and slow, repeating the information in several months, do you know any other way?
Follow the way I'm doing it:
= Table.AddColumn(#"Tipo Alterado1", "Meses", each Table.AddColumn(#"Tipo Alterado1", "Months", each let mystart=[CN9_DTINIC], myend=[CN9_DTFIM] in
List.Generate(()=>Date.EndOfMonth(mystart),each _ <= Date.EndOfMonth(myend),each Date.AddMonths(_,1))))
2 Replies
- v-cherch-msftMicrosoft Employee
Hi Anonymous
I would suggest you do that with DAX like Ashish_Mathur said in this thread.If it is not your case,sample data and expected output will be helpful to provide an accurate solution.You can also upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.
Regards,
Cherie
- AnonymousNot applicable
Hi cherie
What Ashish_Mathur said its not my case. Follow the link with the .pbix sample: https://vyttra-my.sharepoint.com/:u:/p/gabriel_venancio/EdAqCw-3PwVEsvhf75dTlpwBBG3z0vVSqeScuwe9os-3aA?e=dKiaJ6
Regards,
Gabriel Lopes