Forum Discussion

ajohn1's avatar
ajohn1
Advocate I
7 years ago
Solved

Column value as Measure value

Lets say my date column has the value of '2018-12-27'.  How can I get my measure (not column) to equal exacly '2018-12-27'. Or how can I get my measure to equal just the year '2018'.
  • Anonymous's avatar
    Anonymous
    7 years ago

    ajohn1 how about calculate number of days by doing a countdistinct on number of dates in the date table for a year

     

    for example

     

    Customer Count =

    var numdays = CALCULATE(distinctcount([date]), allexcept(query1,year(query1[targetdate]))

    return sum(Query1[Customer Served])/ numdays