Forum Discussion
Anonymous
6 years agoNot applicable
Dax Logic
Hallo All, I have an interesting question and I hope someone can answer this. DISTINCTCOUNT('Date'[MonthinCalender]), where the Column I am counting is just a month column in a date table. If...
v-lid-msft
6 years agoCommunity Support
Hi Anonymous ,
When generate a summarize table, the context “ALLSELECTED()” also Evaluated, so the summarize table should like following: (if select between 1st March and 31th November)
Then the MAXX function calculate the same biggest value 3 for each row, every row have the same result because the ALLSELECTED context. If you want to get the value of Coulmn12 for current quarter, we need to filter the summarize table.
Best regards,
Anonymous
6 years agoNot applicable
The measure that gave me problems was;
CALCULATE(MAXX('Dates', DISTINCTCOUNT('Dates'[MonthInCalendar])) , ALLSELECTED('Dates'))
The measure above gives me the total sum of all the months in the selected date range. In my case it is 29, so this measure gives me 29 over all querters. I get that row context are removed here so it counts all items over selected range, but I thought this would retain the row context and give me 3 over all quarters.
Sorry about the mistake, this is actually the measure that behaved in this way