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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dsmitha
Responsive Resident
Responsive Resident

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 @dsmitha ,

 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 @dsmitha ,

 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!

 

hi djurecicK2,

 

Thanks a lot, super simple solution

double kudoz

 

regards,

dsmitha

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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