Forum Discussion

Analitika's avatar
Analitika
Icon for Post Prodigy rankPost Prodigy
6 years ago
Solved

Move values from columns to row

I have Table1

I need lookup values from DokNr which is equal to ApNr and return sum from DebSum to CredSum

Expected result:

 

 

 

  • Hi Analitika ,

     

    You may create measure like DAX below.

     

    CredSum= CALCULATE(Table1[DebSum],FILTER(ALLSELECTED(Table1), Table1[DokN] =MAX(Table1[ApNr])))

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Analitika , Try a new column

    sumx(filter(table, [AprNo] = earlier([DocNo])),earlier([debSum]))

     

    or


    sumx(filter(table, [AprNo] = earlier([DocNo])),([debSum]))

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi Analitika ,

     

    You may create measure like DAX below.

     

    CredSum= CALCULATE(Table1[DebSum],FILTER(ALLSELECTED(Table1), Table1[DokN] =MAX(Table1[ApNr])))

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.