Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX Measure - Distinct Count YTD Values

Hi!   I'm trying to find the distinct number of times a customer places an order YTD.    So far I have this formula which is giving me a discount count of ALL of that customers orders up to today...
  • amitchandak's avatar
    5 years ago

    Anonymous , have tried datesytd with date table ?

    YTD Sales = CALCULATE(DISTINCTCOUNT(AS400_Transactions[Order_Date Recalc]),DATESYTD('Date'[Date],"12/31"))

     

    To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.