Hi,
I have columns of totals for YTD and Previous YTD figures in my table. I get correct numbers for the current month for the first few days in January. I get the totals for the entire month on all the previous time calculations, but the formulas do not take into account the partial days in the current month. Here are the formulas that I’m currently using:
1. YTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATESYTD(MasterDate[Date]))
2. PYTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]), DATEADD(DATESYTD(MasterDate[Date]),-1,YEAR))
3. MTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATESMTD(MasterDate[Date]))
4. PMTD = CALCULATE(DISTINCTCOUNT(lwmain[lwmainid]),DATEADD(DATESMTD(MasterDate[Date]), -1,YEAR))
I would really appreciate your help on this.