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
knche1234
Regular Visitor

Total Sales Last Year , Need Help!!

Hi!

 

Need help with the following scenario: 

 

I need to calculate the count of Last Year YTD Sales: 

 

LY YTD Sales = TOTALYTD([YTD Sales],SAMEPERIODLASTYEAR('BASE BBI AS400'[Fecha Activación].[Date])) 

 

Apparently it is showing the amount of all sales in 2016 and not the value YTD I am looking for, it shows all 2016 sales. 

 

I used the following formula to calculate YTD sales: 

 

YTD Sales = TOTALYTD(COUNTAX('BASE BBI AS400','BASE BBI AS400'[Anexo]),'BASE BBI AS400'[Fecha Activación].[Date])

 

This formula shows the exact amount for sales starting 01/Jan/2017. 

 

How can I fix the formula to show the total last year from same period on this year? 

 

 

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Have a bit of a read through this article.

 

https://www.kasperonbi.com/get-the-ytd-of-same-period-last-year-using-dax/

 

and see if that helps any,


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

1 REPLY 1
Phil_Seamark
Employee
Employee

Have a bit of a read through this article.

 

https://www.kasperonbi.com/get-the-ytd-of-same-period-last-year-using-dax/

 

and see if that helps any,


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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.