Forum Discussion

Analitika's avatar
Analitika
Post Prodigy
6 years ago
Solved

wrong total sum

Why total sum is wrong?

 

  • Analitika's avatar
    Analitika
    6 years ago

    Solved.

    NewMeasure=
    SUMX(VALUES(PercentTable[CODE]),[4thcolMeasure])

     

9 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion
    please provide your calculation, and can you show the whole table? screen shot of you data helps too otherwise there is no way of knowing
    • Analitika's avatar
      Analitika
      Post Prodigy

      Measure for 4th ( wrong) column
      Col1-Col2*DinamicPercent

      DinamicPercent =
      IF(MAX(PercentTable[%])=0,[SomeProcentFromMeasure],MAX(PercentTable[%]))

      SomeProcentFromMeasure =
      Var Period1 = 
      CALCULATE (
      [s],
      DATESINPERIOD ( 'Date'[Date], LASTDATE ( 'Date'[Date] ), -12, MONTH ),
      ALL(Table1),
      ALL(Table2),

      ALL(Table3)
      )

      Var Period2 = 
      CALCULATE (
      [z],
      DATESINPERIOD ( 'Date'[Date], LASTDATE ( 'Date'[Date] ), -12, MONTH ),
      ALL(Table1),
      ALL(Table2),

      ALL(Table3)
      )
      Return
      DIVIDE(Period1,Period2)

       

       

      PercentTable
      Code | %
      Code1 | 0%
      Code2 | 5%
      Code3 | 5%

      • vanessafvg's avatar
        vanessafvg
        Community Champion
        thanks thats helpful but i can't see the header columns on your screen shot, what is the calculation for [s] and [z]