Forum Discussion

chaichatp's avatar
chaichatp
Icon for Helper III rankHelper III
6 years ago
Solved

Multiply colummns and got wrong answer. Any suggestions?

  • Probably simpler to convert your 3 year to a measure since you are already getting what you expect for your Allct Score measure in you visualization.

10 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    What is the formula for the measure in your column formula? I'm guessing it has something to do with row versus filter context.

    • chaichatp's avatar
      chaichatp
      Icon for Helper III rankHelper III

      I should say like this, it seems it didnt multiply with my SCORE Allct at all(Measure), you can compare both yellow columns, it just divided 3 Yr. Annl TTR by 100 and here is the formula for both columns. 

       
       
      SCORE Allct = DIVIDE(SUM('TOP500-CORREL0_7_TEST'[SCORE]),CALCULATE(SUM('TOP500-CORREL0_7_TEST'[SCORE]),ALLSELECTED('TOP500-CORREL0_7_TEST'[Ticker])),0)
       
      and the output column is
       
      SCORE Allct*3Yr = ([SCORE Allct]*'TOP500-CORREL0_7_TEST'[3 Yr. Annl TTR])/100
       
      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        But Score Allct is a measure, it is going to calculate differently in row context versus in your visual. Because your Score Allct 3 Year is a calculated column, I believe that is where your issue lies. So, you likely either need to switch Score Allct 3 Year to be a measure or change Score Allct to a column. One way or the other.

    • chaichatp's avatar
      chaichatp
      Icon for Helper III rankHelper III

      Here is Data sample and The SCORE Allct*3 Yr column got an issue now. 

       

      Since i would like to be able to filter the date by using the silcer and want the measure to recalculate the % of total row all the time so the formula in measure is 

       

      SCORE Allct = DIVIDE(SUM('TOP500-CORREL0_7_TEST'[SCORE]),CALCULATE(SUM('TOP500-CORREL0_7_TEST'[SCORE]),ALLSELECTED('TOP500-CORREL0_7_TEST'[Ticker])),0)

       

      and this is formula for SCORE Allct*3 Yr

       

      SCORE Allct*3Yr = ([SCORE Allct]*'TOP500-CORREL0_7_TEST'[3 Yr. Annl TTR])/100

       

       

      TickerDateScore(RAW DATA)SCORE Allct (Measure)3 Yr Annl TTR(RAW DATA)ScoreAllct * 3 Yr
      A2/20/2020817.39%33%5.74%

      B

      2/20/2020715.22%20%3.04%
      C2/20/2020613.04%15%1.96%
      D2/20/2020817.39%15%2.61%
      E2/20/2020919.57%10%1.96%
      F2/20/2020817.39%5%0.87%