Forum Discussion

icturion's avatar
icturion
Resolver II
5 years ago

Power Query to DAX

I have the following Power Query that works fine in a normal table.

But now i want to use the same formule in a DAX table but thats not possible for so far i know.

So the question is can somebody help me by writing the formule in DAX?

 

9 Replies

  • icturion , Try like

    Summarize(
    union(
    selectcolumns(Table, "Date", Table[datein], "Work1", [Work1], "Work2", 0, , "Work3", 0),
    selectcolumns(Table, "Date", Table[dateout], "Work1", 0, "Work2", [Work2] , "Work3", 0),
    selectcolumns(Table, "Date", Table[datecheck], "Work1", 0, "Work2", 0 , "Work3", [Work3])
    ), [Date], "Work1", sum([Work1]), "Work2", sum([Work2]), "Work3", sum([Work3]), "Total", sum([Work1])+sum([Work2])+sum([Work3]))

     

     

    • icturion's avatar
      icturion
      Resolver II

      amitchandak 

      Where do i need to place the formula?

       

      Within tabel1? As a Calculated column or measure?

      If i place it in a measure i get the following error:

      Can't find table with column [work1]