Forum Discussion

Psycho's avatar
Psycho
Frequent Visitor
9 years ago
Solved

Creat a comparative conditions

Hello together!

 

I have a question for the creation of certain conditions.

 

I want to calculate following, but i dont know the syntax:

 

02 Dur.Bestmge.AktJ = if(Tabelle1[Monat] = "End.Best.Mge.AktJ.02" ; ....

 

....   (the  value [Bestand] of this row + the value [Bestand] of that row, with the same value in the column [Artikelnummer] and the value "End.Best.Mge.AktJ 01" in the column [Monat]) divided by 2

 

 

Unbenannt.png

 Have someone a solution for me?
 
Thanks and greetings.
  • If I understood you correctly, try

     

    02 Dur.Bestmge.AktJ = if(Tabelle1[Monat] = "End.Best.Mge.AktJ 02",
    Tabelle1[Bestand]+LOOKUPVALUE(Tabelle1[Bestand],
    Tabelle1[Artikelnummer],Tabelle1[Artikelnummer],
    Tabelle1[Monat],"End.Best.Mge.AktJ 01"),0)

2 Replies

  • If I understood you correctly, try

     

    02 Dur.Bestmge.AktJ = if(Tabelle1[Monat] = "End.Best.Mge.AktJ 02",
    Tabelle1[Bestand]+LOOKUPVALUE(Tabelle1[Bestand],
    Tabelle1[Artikelnummer],Tabelle1[Artikelnummer],
    Tabelle1[Monat],"End.Best.Mge.AktJ 01"),0)
    • Psycho's avatar
      Psycho
      Frequent Visitor

      Yes, that´s what I want. Wonderfull. Thank you very much.