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

Compare Sales at product level

Hi,

i have a big problem (for me). I have to compare sales between different years at product level. I use sameperiodlastyear but if a product has been sold only till august in 2018 and till september in 2017, my calculation (i want the comparison data as at September 2018) fails because it doesnt take into consideration sales in Sept17. How i can solve it?

I am already performing YTD analysis, below main formulas:

Revenues YTD:=CALCULATE([Revenues];DATESYTD(Calendar[Calendar Day]))

Revenues PY :=CALCULATE([Revenues];SAMEPERIODLASTYEAR(Calendar[Calendar Day]))

Revenues PY (till date) :=CALCULATE([Revenues];FILTER(SAMEPERIODLASTYEAR(Calendar[Calendar Day]);Calendar[Calendar Day]<=EOMONTH([Data Max];-12)))

Data Max:=CALCULATE(MAX(SalesData[Invoice Date]);ALL(Calendar))

The problem is the following (when i have to compare YTD as at September FY18):

128k of sales for the specific product category in the FY17 (previous year) are not included in the analysis as in FY18 the product category has not been sold in September, but i would like to include Sept17 as i want the comparison as at 30Sept18.

Hope it is clear. Pls help

Thanks

Luca

Untitled.png

 

1 ACCEPTED SOLUTION

HI,

problem solved, i was performing the wrong calculation of "data max".

bye

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi Luca1,

 

"128k of sales for the specific product category in the FY17 (previous year) are not included in the analysis as in FY18 the product category has not been sold in September, but i would like to include Sept17 as i want the comparison as at 30Sept18."

 

<--- Not quite know your requirement. Could you make some mock-up to explain your requirement more explicitly?

 

Regards,

Jimmy Tao

HI,

problem solved, i was performing the wrong calculation of "data max".

bye

Luca1
New Member

Readd the photo that shows the problemUntitled.png

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.