Forum Discussion

smmoore34's avatar
smmoore34
Icon for Advocate II rankAdvocate II
1 year ago
Solved

when creating a measure using a date table the date column is not recognized

I have a date table marked as a date table with a column called date. I want to create a measure to compare YTD record totals to LYTD record totals. The first measure I want to create is:  YTD_tota...
  • MasonMA's avatar
    1 year ago

    Hello smmoore34

     

    If your date table is already marked as Date Table (If not, in Modeling 'Mark as Date Table'), then use below time intelligence function, 

     

    YTD=
    TOTALYTD(
    DISTINCTCOUNT('CIVIL_AssignedOnly'[callid]),
    'DATE'[Date]
    )

     

    LYTD =

    CALCULATE(
        DISTINCTCOUNT('CIVIL_AssignedOnly'[callid]),
        SAMEPERIODLASTYEAR('DATE'[Date])
    )