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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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