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
kukszi
Helper I
Helper I

Number of distribution points when analyzing sales data

Hi there,

 

I'm facing with a bit complicated issue when analyzing sales data. I need to collect insights regarding distribution information.

I need the following measures, and need help on how to put them together:

  • Distribution points: the number of customers who purchased ONE of my products in the last 3 months. This should be calculated by product, and then summarized for the total product portfolio
  • Distribution points LY: number of distribution points in same period last year
  • Distribution YTD, Distribution YTD LY: the same two as above, but instead of the last 3 months, it needs to be calculated as a year-to-date number based on a custom calendar (1st period is July, 12th period is June)
  • Total universe: number of customers who purchased ANY of my products in the last 3 months. This is the total number of the customers my company deals with, so no need to summarize it by product.
  • Total universe LY: total universe in the same period last year
  • Total universe YTD, Total universe YTD LY: same as the above two, but calculated based on the custom calendar.

 

The sample data looks like this:

kukszi_0-1622506575116.png

 

The expected outcome based on the below sales matrix should be the following:

  • May distribution (March & April & May) for Product 1 is 4 points of distribution,
  • Total points of distribution for the whole product portfolio is 22 points of distribution
  • total universe is 5 customers

kukszi_2-1622506802273.png

Thanks in advance for the help.

 

Regards,

kukszi

 

 

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

You'll see the file on the following link:

https://1drv.ms/u/s!Ahe6i1sgibEEbHM81WYARcnJPPE?e=BG3Nct

 

Thanks,

kukszi

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@kukszi , Trt measures with date table

 

 

Sales Amount= Sum(table[sales])

//With date table

Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date]),-3,MONTH))
Rolling 3 before 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAXX('Date',dateadd('Date'[Date],-3,month)),-3,MONTH))


Did not purchase in last 3 month

countx(values(Table[Customer]),if(isblank([Sales Amount]),[Customer], blank()))


YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

 

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retenti...

 

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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.