Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Creating a New Measure based on MTD or YTD
02-21-2023
08:25 AM
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 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023
01:49 PM

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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023
06:10 AM

Any thoughts on this? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2023
08:31 AM

@kendall 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)
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...

Helpful resources
Recommendations
Subject | Author | Posted | |
---|---|---|---|
07-11-2024 03:26 PM | |||
10-19-2022 02:04 PM | |||
03-04-2024 05:10 AM | |||
Anonymous
| 07-14-2021 04:49 AM | ||
09-03-2024 01:57 PM |