cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
benlewellyn
Helper I
Helper I

New Placements/Customers

Hello,

 

We sell a portfolio of products and would like to track the new placements of each item within the portfolio at every customer (aka account).  A new placement would be defined as the sale of an item that had not been sold to that account in the previous x days (irrespective if the item had been sold there before that period).  I have a date table and a sales table with dates; my preference would be to tie the zero-sales period to the sales table date as it is usually a few days behind the actual calendar.

 

I would think this should be relatively easy in DAX, but nothing I have tried has worked.  Thanks for any help you can provide.

 

Ben

4 REPLIES 4
v-lionel-msft
Community Support
Community Support

Hi @benlewellyn ,

 

Please provide a sample data sheet and expected output sheet.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User IV
Super User IV

Thanks for these references.  I have tried these solutions but I can't tell how to fix the "unsold" date range to a particular number.  I'm trying to find accounts that did not buy the product in the previous 30 days or 90 days (for instance) rather than the previous week/month/quarter/year etc. 

 

Here is one version I tried that didn't work.  My question is where to put the 90 day range.

 

New Accounts =
VAR currentcust = VALUES(Account_Lookup[Account ID])
VAR priorcust = CALCULATETABLE(values(Account_Lookup[Account ID]),
FILTER(ALL(Calendar_Lookup[Date]), Calendar_Lookup[Date]>MIN(Calendar_Lookup[Date])-90 && Calendar_Lookup[Date]<=MIN(Calendar_Lookup[Date])))

RETURN
CALCULATE([Did Buys],EXCEPT(currentcust,priorcust))
 
Thanks,
Ben
Greg_Deckler
Super User IV
Super User IV

@benlewellyn - This may help - https://community.powerbi.com/t5/Quick-Measures-Gallery/New-and-Returning-Customers/m-p/168297#M13

 

Otherwise - Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors