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 w...
  • v-yuta-msft's avatar
    7 years ago

    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.