Forum Discussion

Fusilier's avatar
Fusilier
Helper III
2 years ago
Solved

Help with total measure

Hi,

I have this measure:

Count = COUNTROWS('All Responses (2)')
which produces this matrix:
I'm trying to create two measures and add them as new columns in the matix
  1. a measure to show for example next to the 'Fairly safe' column the 935 in each row in a new column
  2. a percentage of the total for each column divided by the grand total e.g. 935/2892, just struggling with the dax required.
So, the final matrix would look something like this:
I thought it would be dead simple to do but I'm struggling.
Can anybody help me please?
 
Thanks

 

  • HI, Fusilier 

    Try below measures
    Just Rename your Table name and column name

     

    New col 2_Fairly safe(% measure) =
    var a = calcualte([Count],removefilters(table[Age Group]))
    var b = calculate([fairly safe],removefilters(table[Age Group]))
    return
    divide(b,a)
    New col 2=
    
    calculate([fairly safe],removefilters(table[Age Group]))
    

     


    Use same way for fairly unsafe just replace fairly safe with Fairly unsafe measure


    Best Regards,
    Dangar

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies