Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Matrix visual - dynamic display

Hello:    fact table columns point name point id date h1 h2 h2   i want a matrix withe following row Point a sum of hours  Point b sum of hours  third row a measure ratio a over b  colu...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous 

     

    Here is another approach:

     

    First create two measures to calculate the sum hours for point a and b separately, which are similar to bhanu_gautam 's suggestions. 

    Point a = CALCULATE(SUM(FactTable[h1])+SUM(FactTable[h2])+SUM(FactTable[h3]), FactTable[point name]="point a")
    Point b = CALCULATE(SUM(FactTable[h1])+SUM(FactTable[h2])+SUM(FactTable[h3]), FactTable[point name]="point b")

    Then create a third measure to calculate the ratio of a to b.

    Ratio a/b = DIVIDE([Point a],[Point b])

     

    In the Matrix visual, place all three measures into Values field, place Month column to Column field. Then in Values section of Format pane, turn on Switch values to rows option. 

    You will have a matrix similar to below one.

    Hope this would be helpful. 

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!