# of new customers per month with Power Pivot

charleyb0y

New Member
Joined
Mar 15, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm fairly new to Power Pivot and I've been playing around with Calculated columns, measures and DAX.

I have a data set that contains all orders from all customers, with the date associated. I want to display the new customers only, per month. Outside of Power Pivot, I would probably have used COUNTIF to check for other orders from same customer in previous months.... I've seen numerous posts about "countif with DAX", but I never seem to be able to translate the examples to my specific issue.

For example, looking at this pivot table, I see that Customer A and D were new customers in January, and that customer B and C were new customers in February.
1615828695248.png


Would someone be able to guide me in the right direction? I have spent hours looking at measures, and then at calculated columns... I just don't seem to get how I would need to achieve this.

Thanks for your help
 

Attachments

  • 1615828659699.png
    1615828659699.png
    9.9 KB · Views: 1

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

charleyb0y

New Member
Joined
Mar 15, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I got it to work using a mix of a calculated column and measures.

Calculated column:
Excel Formula:
=IF(CALCULATE(COUNTROWS(Data),FILTER(ALLEXCEPT(Data,Data[Customer Code]),Data[Date (end of period)]< EARLIER(Data[Date (end of period)])))> 1,false,true)

Measures:
Excel Formula:
Total Customers:=DISTINCTCOUNT(Data[Customer Code])
New Customers:=CALCULATE(DISTINCTCOUNT([Customer Code]),Data[New customer]=true)
Returning Customers:=CALCULATE(DISTINCTCOUNT([Customer Code]),Data[New customer]=false)
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,129,361
Messages
5,635,812
Members
416,884
Latest member
leeshjay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top