Forum Discussion

Mars3442's avatar
Mars3442
Icon for Helper I rankHelper I
3 years ago
Solved

Average based on date slicer

Hi all, I have created a table like this Sales table I created a date slicer  And I want to create a card that would show the average based on the selected period So, When I select Jan, F...
  • Dangar332's avatar
    3 years ago

    hi, Mars3442 

     

    Try below code 

    adjust your table name

    result =
    var a = SUM('Table'[sales])
    var b =CALCULATE(DISTINCTCOUNT('Table'[date]))
    return DIVIDE(a,b)