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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
CalebG
Frequent Visitor

Limiting data to to the current date a year ago

I'm currently trying to compare year-over-year data in power bi so I can see how this April compared to April 2022. However, I am pulling all data from last year and this year so I'm not sure how to go about this in a table or with transforming my data. If anyone has any ideas how I could do this that would be amazing. Thanks so much!

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @CalebG ,
You should create a date table and use time intelligence functions.
Please refer these tutorials:

https://www.youtube.com/watch?v=MhYEqniwung

https://www.youtube.com/watch?v=nrjJuNbzKRA

https://www.youtube.com/watch?v=VLOHvQyCKWo

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Thanks so much, I was able to figure it out by using the function with my_date <= DATE(2023, MONTH(NOW()), DAY(NOW())).

View solution in original post

2 REPLIES 2
Ritaf1983
Super User
Super User

Hi @CalebG ,
You should create a date table and use time intelligence functions.
Please refer these tutorials:

https://www.youtube.com/watch?v=MhYEqniwung

https://www.youtube.com/watch?v=nrjJuNbzKRA

https://www.youtube.com/watch?v=VLOHvQyCKWo

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks so much, I was able to figure it out by using the function with my_date <= DATE(2023, MONTH(NOW()), DAY(NOW())).

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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