Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Dynamic percentage based on attributes applied

I'd like to create a measure that displays a percentage of time-phased labour cost data dependent on the attributes added to a visual. The attributes I want to be able to apply are (I want the abilit...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Ok great, the formatting must have been the elusive element.

     

    Doing some quick maths:

     

    208764.42 / 37968039.17 = 0.005498425.  As a percentage that should be 0.54%.  So that means you are correct in that its 100 times too small, plus the number itself is wrong.

    Lets create 2 more measures. 

    Numerator = SUM('YourTable'[SumActualCost])
    Denominator = SUM('YourTable'[Total Cost])

    Bring those into the matix next.  I'm curious what that comes up with.

     

    For the reason the reason it doesn't add to 100%, i believe My error is with Total Cost.  Instead of SUM for the Denominator, we should use MAX instead.  This is because you don't actually want to sum up that column.

  • Anonymous's avatar
    Anonymous
    8 years ago

    No definately not, thats not necessary.  Does your formula now look like?

    Simple % = DIVIDE(
         [Numerator],
         [Denominator]
    )

    Remembering Numerator and Denominator are measures, so we can call them directly in our new Measure.