Forum Discussion

wimlin's avatar
wimlin
New Member
3 years ago

Look up employer from other table


I found and used this query:


But when i used more lines in power query it worked very very slow.

 

What is possible to make this faster?

 

3 Replies

  • ams1's avatar
    ams1
    Icon for Responsive Resident rankResponsive Resident

    Hi,

     

    Could you please be more specific at least regarding:

    • how many "more lines": a) how many rows in Dim Table and b) how many rows in Fact Table
    • how slow

    ?

     

    Also, would be valuable to see the whole query - after you remove confidential information.

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Icon for Community Champion rankCommunity Champion

    NewStep=let a=Table.Buffer(Table.Groups(Dim_Table,"Employee",{"n",each _})) in Table.AddColumn(FactTable,"Employer",each let b=a{[Employee=[Employee]]}? in if b=null then null else Table.SelectRows(b,(x)=>x[Start Date]<=[Working Date] and (x[End Date]=null or x[End Date]>=[Working Date])){0}?[Employer]?)

  • Hi,

    In my dimension table 2.461 rows

    In my fact table 255 rows. This is a time registration table. This now show only hours from week 1. Week 1 is a week with few rows.
    My fact table fetched now 200mb from dimension table.


    Refresh time is now for one week 5 minutes