Forum Discussion

Fro88er's avatar
Fro88er
Helper IV
5 years ago
Solved

Field values match, divide unique field value

I am trying put a curve measure on the Total Points measure, by dividing the Total Points by the City Name [Practice Group Count] on a seperate table. If City Names match Table1 with Table2 then divide the Practice Group Count by the [Total Points] on the respected City Name. At first I thougt this is pretty straight forward and I wanted to use a seperate table versus writing 15 variables / if statements if possible.

 

Much appreciated, in advance.

 

Points Total = [Points JO]+ [Points SO]

 

  • Fro88er's avatar
    Fro88er
    5 years ago
    I answered my own question. I added measure on the Dimension Table, then another new measure dividing the [Points Total] by the new [Curve] meaure.
     
    Curve =
    CALCULATE(
    SUM(DimHandicap[PracticeGroupCount])
    )
     
    Total Points (Curve) =
    [Points Total]/[Curve]
     
    I appreciate all that took a look at this.

5 Replies

  • what's your reasoning for not combining these two tables into one?

    • Fro88er's avatar
      Fro88er
      Helper IV

      Good question, the Data table has 1000,s rows, the Points Total is calculating. Each with their own City. If I add the number I want to divide by on the data table, then I would have to use an average which opens up a rounding issue. I was only showing you the high level summary.

      • Fro88er's avatar
        Fro88er
        Helper IV

        Adding more context, I want to add a new measure with the if the City Names match divide the respected number correlated to that City. 

    • Fro88er's avatar
      Fro88er
      Helper IV
      I answered my own question. I added measure on the Dimension Table, then another new measure dividing the [Points Total] by the new [Curve] meaure.
       
      Curve =
      CALCULATE(
      SUM(DimHandicap[PracticeGroupCount])
      )
       
      Total Points (Curve) =
      [Points Total]/[Curve]
       
      I appreciate all that took a look at this.