Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Sashankv
Regular Visitor

Dynamically select last year data

I have 2 pages in the dashbord. In the first page i have a date slicer. It is a drop down filter with all the dates. I wanted to filter the values in the second page  line chart  withe filter passed in the first page for last year same date.

 

Eg: if i select Jan 2025 in page 1 it has to filter with all the dates till Jan 2024 i.e from jan 2024 to jan 2025.

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Use  a proper calendar table and SAMEPERIODLASTYEAR

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
v-sathmakuri
Community Support
Community Support

Hi @Sashankv ,

 

I hope this information provided is helpful. Feel free to reach out if you have any further questions or would like to discuss this in more detail. If responses provided answers your question, please accept it as a solution so other community members with similar problems can find a solution faster.

 

Thank you!!

v-sathmakuri
Community Support
Community Support

Hi @Sashankv ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

 

Thank you!!

v-sathmakuri
Community Support
Community Support

Hi @Sashankv ,

 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Use  a proper calendar table and SAMEPERIODLASTYEAR

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.