Forum Discussion
Anonymous
3 years agoNot applicable
Creating a New Measure based on MTD or YTD
Hello,
Below are photos for a problem. How could I count a running total for the Number of Surveys received a) month to date and b) year to date? I have tried the code below but it is not working:
Better RT =
VAR __Date = MAX('All survey data'[Month])
VAR __Table = FILTER(ALLSELECTED('All survey data'[Month]),<= 'All survey data'[Month])
RETURN
SUMX('All survey data','All survey data'[Counted Survey Number])
3 Replies
- Greg_DecklerCommunity Champion
Anonymous Hard to tell what is going on without sample data and more formulas but try this:
Better RT = VAR __Date = MAX('All survey data'[Date]) VAR __Table = FILTER(ALLSELECTED('All survey data'), [Date] <= __Date) RETURN COUNTROWS(__Table) - AnonymousNot applicable
If I send you the data, would you be able to tell me the formula? Thanks. Basically a count of surveys received for month to date and year to date based on this source data in Excel
- AnonymousNot applicable
Any thoughts on this? Thanks