Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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 @Anonymous ,

 

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.

Anonymous
Not applicable

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
Super User

@Anonymous - 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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.