Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 2
v-cherch-msft
Employee
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

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not 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-3...

 

Regards,

Gabriel Lopes

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.