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, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

DAX Patterns - Product results by year after launch date.

Hello Community,

 

I am trying to figure out a way to create a measure(s) to calculate product results by year...following its initial launch date.

 

The reason I have put "DAX Patterns" in the title is because this issue reminds me of something seen in the great DAX Patterns book/website however, I don't see this pattern mentioned in any of the literature. I am currently using the Month-related calculation patterns mentioned here in my model. 

 

Here is a simple example of the situation:

Product 12345678910 launched in March 2018. I want to see sales volume by year, for years 1, 2, and 3. The pattern here would be:

Year 1 = March 2018 to February 2019.

Year 2 = March 2019 to February 2020.

Year 3 = March 2020 to February 2021.

 

I have sales volume results that go beyond year 3 but I do not need to see them - just the first 3 years of sales volume by year. I have thousands of products that have launched anywhere between 10/1/2017 to the current date and their results, so this would need to be dynamic based on launch date.

 

Is there a pattern I can use to achieve the results I want to see?

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amitchandak 

 

Thank you for your response. Unfortunately, this does not achieve what I am looking to do. However, I found a solution on SQLBI that layouts how to solve the issue mentioned above.

 

For those who might visit this post in the future, the link is below.

 

https://www.sqlbi.com/articles/yearly-customer-historical-sales-in-dax/

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @amitchandak 

 

Thank you for your response. Unfortunately, this does not achieve what I am looking to do. However, I found a solution on SQLBI that layouts how to solve the issue mentioned above.

 

For those who might visit this post in the future, the link is below.

 

https://www.sqlbi.com/articles/yearly-customer-historical-sales-in-dax/

amitchandak
Super User
Super User

@Anonymous , You have to create bucket of the month or year like I have done in this example 

 

Customer Retention Part 3: Period Of Stay – Cohort Analysis: https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-3-Period-Of-Stay-Cohort-Analysis/ba-p/1393410

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors