Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Divide by Count using a slicer

Hi,   I have a table that contains the columns hours & the week number of these hours.   I have a slicer using week number. If I select in the slicer for example -   Weeks 1 to 8   I want to ...
  • parry2k's avatar
    6 years ago

    Anonymous try following measure

     

    Avg = 
    DIVIDE ( 
    SUM ( Table[Hours] ), 
    COUNTROWS ( VALUES ( Table[WeekNumber] ) ) 
    )

     

  • fhill's avatar
    6 years ago

    I agree with the solution above as well.  The table shown to the right is the raw data.  The slicer limits the number of rows and associated Hours to the MEASURE.  If this doesn't work, I'm assuming there's more to your raw data than just these two rows.  Can you post a sample please.
    FOrrest