12 Replies Latest reply: Jun 22, 2017 1:03 PM by David Forest RSS

    Hi All, I'm new to Qlik and could use some help.

    James McMahon

      I have pivot table that looks like the one below. I'm trying to take the difference between price and prior price (for same Lot# and plant), if increase in price, then multiply it by quantity sold at price increase. If no increase then 0.  Thank you.

       

           

      Rows Measures
      Lot#CustomerPlantMonth Price Quantity SoldImpact
      0021Johnnies58 $ 4.35 2                                                                   
      0021Johnnies59 $ 5.01 25=if(5.01>4.35 for same Lot# and plant, then Impact =(5.01-4.35) *25
      0021Johnnies510 $ 5.10 21
      0021Johnnies511 $ 5.10 23
      0021Johnnies512 $ 5.25 10
      0035Joney78 $ 2.67 6
      0035Joney79 $ 2.80 4
      0035Joney710 $ 2.85 53
      0035Joney711 $ 2.90 5