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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

time period

Hi,

 

Request your guidance to solve this issue

 

We have a dashboard which shows sales for the day and month when we select a salesman from the slicer. We would like to have the sales during the last year on the same date for the selected salesman. i.e if sales of 02/12/2022 is  $100  then it should also show sales for the date 02/12/2021.  how can we make this happen

 

kindly advise

 

regards,

dsmitha

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @Anonymous ,

 You can use SAMEPERIODLASTYEAR to accomplish this:

https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax

 

Please accept as solution if this answers the question- thanks!

 

View solution in original post

2 REPLIES 2
djurecicK2
Super User
Super User

Hi @Anonymous ,

 You can use SAMEPERIODLASTYEAR to accomplish this:

https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax

 

Please accept as solution if this answers the question- thanks!

 

Anonymous
Not applicable

hi djurecicK2,

 

Thanks a lot, super simple solution

double kudoz

 

regards,

dsmitha

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.