- 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

How to add filter for current year data upto previous month
Hi All
I would like to set a filter to send out the monthly report by subscription but the date filter only allow current year or last x months. It is required to send out an YTD report, but up to previous month.
Anyone know how to set?
Thanks
Vincent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks Yolo
But I still have found some problem on the display
You see that the table show "0" inin colunm 3 & 4 at 202301, but the actual data is showing in row 2, i.e. 202302. i.e all the data are shift one month, what will be the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @sf04357
I don't know the expression, the data show 0 in the fiest month of the year, what the output you want?
Best Regards!
Yolo Zhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

For data is shown in row 2 instead of row 1, i.e. the monthly data are shift
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @sf04357
1.You can use TOTALYTD() function,
e.g
Measure =
CALCULATE (
TOTALYTD ( SUM ( Sales[Value] ), 'Date'[Date] ),
'Date'[Date] < TODAY ()
)
And you can refer to the following link about the function.
TOTALYTD function (DAX) - DAX | Microsoft Learn
2.You can create a measure then put it to the visual filter
Measure =
IF (
YEAR ( SELECTEDVALUE ( date[date] ) ) = YEAR ( TODAY () )
&& MONTH ( SELECTEDVALUE ( date[date] ) ) < MONTH ( TODAY () ),
1,
0
)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-29-2024 09:45 PM | |||
08-03-2023 02:39 AM | |||
12-11-2023 03:11 AM | |||
Anonymous
| 05-23-2023 12:07 PM | ||
03-23-2024 12:23 AM |
User | Count |
---|---|
132 | |
105 | |
86 | |
55 | |
46 |