Forum Discussion
diogoricciardi
5 years agoFrequent Visitor
Distinct Count YTD by Month
Hi everyone, Hope you're all safe. I'm having some trouble trying to figure out how to calculate a YTD distinct count by month. To be more specific, when I use TOTALYTD function with DISTINC...
amitchandak
5 years agoSuper User
diogoricciardi , Try a measure like
YTD Sales = CALCULATE(SUMX(values('Date'[Month Year]), calculate(Distinctcount(Table[ID]))),DATESYTD('Date'[Date],"12/31"))
diogoricciardi
5 years agoFrequent Visitor
Holy crap, that worked...
Sorry to be a pain, but can you explain to me what is really going on in this function? I could't figure it out.
Thank man..
- amitchandak5 years agoSuper User
diogoricciardi , values('Date'[Month Year]) is forcing the data to be distinct count till month level, and post that sumx will work. A level of details implementation