Forum Discussion

Siriwat_Lukin's avatar
5 years ago
Solved

How to use Lookupvalue in M Query from same table

Hello,

 

I am Siriwat, Beginner for M language of Power BI.

I want to create energy report from Electrical meter that accumulate data as below :

 

and the data that i want in yellow column :

 

I can solve it in DAX function by create column with lookupvalue(table : meter1,table : date,table: date+1) and meter2 also.

 

but i can't find solution with M Query in Transform data.

So if I want to use this function in M Query, How i will do ?

 

Thank in advance 🙏

7 Replies

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

         

          can you give the new date formula ?. I tried newdate= Date - duration(1,0,0,0). it is not working.

         

        Thanks,

        Shanthakumar.

  • Anonymous's avatar
    Anonymous
    Not applicable

    hi,

     

           is the newmeter1 and new meter2 coming from another table ?.

     

    Thanks,

    Shanthakumar.

    • Siriwat_Lukin's avatar
      Siriwat_Lukin
      Helper I

      Hi,

       

      No it's come from column meter1 and meter2. 

      Example (meter1),

       

      250 (from 02/01/2021) - 200 (from01/01/2021) = 50 (show in new meter1)

       

      Thank you,