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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Didierabiven
New Member

Table generated with a table source from azure

I try to generate with a  SQL table (Table 1)  from azure containing more then one millions of line , a new table (Table 2) generated as describe below.

 

Any Idea what should be the moste efficient way to do it ?

 

Table 1       
ContratStoreKeyDate debutDate FinDate d'achatDate de VenteNombre de Jours
124505003EH1932#12342017-02-102017-02-152017-01-102017-03-165
145012004EH19E2#ADES2017-01-152017-01-152017-05-012018-04-020
145201A003H1932#13AB2017-04-062017-04-282017-01-01 22
        
Table  generated       
        
ContratStoreKeyDate debutDate d'achatDate de Vente  
124505003EH1932#12342017-02-102017-01-102017-03-16  
124505003EH1932#12342017-02-112017-01-102017-03-16  
124505003EH1932#12342017-02-122017-01-102017-03-16  
124505003EH1932#12342017-02-132017-01-102017-03-16  
124505003EH1932#12342017-02-142017-01-102017-03-16  
124505003EH1932#12342017-02-152017-01-102017-03-16  
145012004EH19E2#ADES2017-01-152017-05-012018-04-02  
145201A003H1932#13AB2017-04-062017-04-282017-01-01  
145201A003H1932#13AB2017-04-072017-04-282017-01-01  
145201A003H1932#13AB2017-04-082017-04-282017-01-01  
145201A003H1932#13AB2017-04-092017-04-282017-01-01  
145201A003H1932#13AB2017-04-102017-04-282017-01-01  
145201A003H1932#13AB2017-04-112017-04-282017-01-01  
145201A003H1932#13AB2017-04-122017-04-282017-01-01  
145201A003H1932#13AB2017-04-132017-04-282017-01-01  
145201A003H1932#13AB2017-04-142017-04-282017-01-01  
145201A003H1932#13AB2017-04-152017-04-282017-01-01  
145201A003H1932#13AB2017-04-162017-04-282017-01-01  
145201A003H1932#13AB2017-04-172017-04-282017-01-01  
145201A003H1932#13AB2017-04-182017-04-282017-01-01  
145201A003H1932#13AB2017-04-192017-04-282017-01-01  
145201A003H1932#13AB2017-04-202017-04-282017-01-01  
145201A003H1932#13AB2017-04-212017-04-282017-01-01  
145201A003H1932#13AB2017-04-222017-04-282017-01-01  
145201A003H1932#13AB2017-04-232017-04-282017-01-01  
145201A003H1932#13AB2017-04-242017-04-282017-01-01  
145201A003H1932#13AB2017-04-252017-04-282017-01-01  
145201A003H1932#13AB2017-04-262017-04-282017-01-01  
145201A003H1932#13AB2017-04-272017-04-282017-01-01  
145201A003H1932#13AB2017-04-282017-04-282017-01-01  
1 ACCEPTED SOLUTION

Thanks a lot for your solution. I have a  question, which one should be the best in term of weight  and speed. ?

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Didierabiven

I test with your data using two methods using M in Query Editor and DAX.

With DAX, Create new tables with following formula.

Table = CALENDARAUTO()

Table 2 = CROSSJOIN(table1,FILTER('Table',[Date]<=DATE(2017,4,28)))

Table 3 = FILTER('Table 2',[flag]=1)

Here is pbix using DAX.

In Query Editor, create blank query from New Source->Blank Query, then write M in Advanced Editor.

Here is my pbix using M.

 

Best Regards

Maggie

Thanks a lot for your solution. I have a  question, which one should be the best in term of weight  and speed. ?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.