- 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

Line chart range function
I currently have a report that pulls together many line items and orgainzes them by department, report date and hours. When transitioning to a new month I would like a function or measure that would search for the most recent date then calculate the first and last day of the month.
Example: Most recent date is 8/3/2022 function sets minimum range to 8/1/2022 seperate function for maximum range would set the range to 8/31/2022.
The reason for this is I would like a seamless transition between months so I do not have to manually change the ranges for every chart in every report.
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Anonymous ,
Try adding a Relative date filter to the line chart.
It will automatically filter the data for this month based on Today() automatically.
Or you want to display all the data, use the auxiliary line to mark the current month's data:
Please new measures:
start of the month = EOMONTH(TODAY(),-1) + 1
end of the month = EOMONTH(TODAY(),0)
Add Lines:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Anonymous ,
Do you want something like this?
If yes, please try measures like:
line_1 =
CALCULATE (
[Measure],
FILTER (
ALLSELECTED ( 'Calendar' ),
'Calendar'[Date]
= EOMONTH ( MAX ( 'Calendar'[Date] ), -1 ) + 1
)
)
line_2 =
CALCULATE (
[Measure],
FILTER (
ALLSELECTED ( 'Calendar' ),
'Calendar'[Date]
= EOMONTH ( MAX ( 'Calendar'[Date] ), 0 )
)
)
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Gao,
This answer gets me close because it will filter the data for the current month. However this does not help me update the range of the line chart. Could this be done through a measure?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Anonymous ,
Do you want something like this?
If yes, please try measures like:
line_1 =
CALCULATE (
[Measure],
FILTER (
ALLSELECTED ( 'Calendar' ),
'Calendar'[Date]
= EOMONTH ( MAX ( 'Calendar'[Date] ), -1 ) + 1
)
)
line_2 =
CALCULATE (
[Measure],
FILTER (
ALLSELECTED ( 'Calendar' ),
'Calendar'[Date]
= EOMONTH ( MAX ( 'Calendar'[Date] ), 0 )
)
)
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Anonymous ,
Try adding a Relative date filter to the line chart.
It will automatically filter the data for this month based on Today() automatically.
Or you want to display all the data, use the auxiliary line to mark the current month's data:
Please new measures:
start of the month = EOMONTH(TODAY(),-1) + 1
end of the month = EOMONTH(TODAY(),0)
Add Lines:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
12-24-2024 11:19 PM | |||
08-22-2024 12:04 PM | |||
10-23-2024 12:16 AM | |||
07-31-2024 03:01 PM | |||
09-30-2024 07:09 AM |
User | Count |
---|---|
134 | |
124 | |
84 | |
61 | |
46 |