Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Indices in DAX

Hi,   So I thought this would be simple but its not appearing to be so.   I just need to iterate through a column and take the value1 and compare that to the average for the whole table for that ...
  • mahoneypat's avatar
    6 years ago

    Here is a column expression to do that:

     

    Avg Column = 'Table'[Value]/AVERAGE('Table'[Value])*100
     
    And here is a measure expression that does it (to be used in a table visual that has the Value column in it:
     
    Avg Measure = SELECTEDVALUE('Table'[Value])/CALCULATE(AVERAGE('Table'[Value]), All('Table'))*100
     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat