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
caseywhite
New Member

Measure where customer bought same product this year (period) and last year (period)

Hello All,

 

We have a dataset with transactional data (Invoice #, Item Number, Customer Number, QTY, Sale Value, Cost) that we need to analyze for pricing.  We need to display a list of customers where they bought the same product this year (ytd) and last year (ytd).  

 

I have a measure for calculating Total Sales LY, Total Cost LY, etc... but I'm struggling with how to create a measure for 'Total Sales Last Year - Same Product' and 'Total Sales this Year - Same Product'

 

This is my current measure for total sales.  This gives me everything though.

 

Total Sales LY = CALCULATE([Total Sales],SAMEPERIODLASTYEAR(Dates[Date]))

 

Can anyone help?

3 REPLIES 3
v-sihou-msft
Employee
Employee

@caseywhite

 

Do you need to analyze your data on each Product Level? Or you want to get the customers bought same product for both years, no matter what product? 

 

Regards,

We would eventually need to see both.

1: Customers who bought the same product this year, and last year (same period) so we can analyze the price increase/decrease across these customers.

2: Products that were bought this year, and last year (same period) so we can analyze the price increase/decrease across these products.

Can you share a sample .pbix (uploaded to dropbox or sharepoint)?

 

 

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.