Forum Discussion

bcampbell's avatar
bcampbell
Icon for Helper I rankHelper I
7 years ago
Solved

Difference Value to Average Per Day

I created a Chart that is comparing a count of value from selected year to the last and the difference

 

I also have a card that is giving me the value of the difference

 

I am trying to find a way to take the difference value measure and turn into an average per day.  But the day would be based on slicer selection (  'Calendar' [Date] )

 

Any Suggestions ?

 

I would also like to show a per hour number as well

 

Thanks

  • bcampbell ,

     

    To be general, you can create two measures like pattern below and drag the measures to the card chart.

    Measure based on selection =
    CALCULATE (
        [average],
        FILTER ( Table, Table[Date] = SELECTEDVALUE ( Table[Date] ) )
    )
    
    Measure based on per hour =
    CALCULATE (
        [average],
        FILTER ( Table, HOUR ( Table[Time] ) = HOUR ( EARLIER ( Table[Time] ) ) )
    )
    

    Community Support Team _ Jimmy Tao

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

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    bcampbell ,

     

    To be general, you can create two measures like pattern below and drag the measures to the card chart.

    Measure based on selection =
    CALCULATE (
        [average],
        FILTER ( Table, Table[Date] = SELECTEDVALUE ( Table[Date] ) )
    )
    
    Measure based on per hour =
    CALCULATE (
        [average],
        FILTER ( Table, HOUR ( Table[Time] ) = HOUR ( EARLIER ( Table[Time] ) ) )
    )
    

    Community Support Team _ Jimmy Tao

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