Forum Discussion
Counting selected month at certain month values
- 6 years ago
Check the screenshot, is this what you need. Please find formula
Cumm month = var _min = minx(ALLSELECTED('Date'),('Date'[Date])) return CALCULATE(DISTINCTCOUNT('Date'[Month-Year]),FILTER(all('Date'),'Date'[Date]<=max('Date'[Date])&& 'Date'[Date]>=_min))This calendar is attcahed with my facts.
As long as your table is joined with date table and date table has month, year, month year you can filter on any range. Similarly, if you take a country Slicer, It will filter on that.
What is that you are not able to achieve, require a formula.
- AlexFulgosi6 years agoFrequent Visitor
I need to show this count for every level of the "month name" variable in the dim date. If May is the third selected month it should be written 3 on the May row. (If one country is selected. If I select two countries of course it's 6).
For some reasons, it compute the count as 1 for each month (with one selected country), it seems like the table is keeping the filter from the selected month name, even if I used a calculate on a ALLEXCEPT where selected month is not considered.
- amitchandak6 years ago
Super User
Check the screenshot, is this what you need. Please find formula
Cumm month = var _min = minx(ALLSELECTED('Date'),('Date'[Date])) return CALCULATE(DISTINCTCOUNT('Date'[Month-Year]),FILTER(all('Date'),'Date'[Date]<=max('Date'[Date])&& 'Date'[Date]>=_min))This calendar is attcahed with my facts.