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
Anonymous
Not applicable

Though DAX calculation

Hi All,

I could use some help calculating the following measure.

So I have 3 tables containing a lot of data.

  • Customer
  • Leads
  • Sales

 

The goal of my measure is to calculate the total conversion from lead to sale.

Note that my relationship is only set-up as followed :

Robin666_0-1635238177217.png

 

So a customer can have multiple leads and multiple sales.

I would need to calculate the number leads that have been qualified, meaning have a sale that is generated after the lead creation date and not later then 90 days after the creation date.

 

My main difficulty is the many to many kind of this calculation! A column or measure, both would be fine!

 

Hope someone can help me out! 😊

 

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Can you provide some sample data and expected result to help us understand it better? As you said, a customer can have multiple leads and multiple sales, so how can we know which leads are related to which sales?

 

Best Regards,
Community Support Team _ Jing

amitchandak
Super User
Super User

@Anonymous , You can create a new column in lead like

 

Has sales = var _1 = countx(filter(sales, lead[customer id] = sales[customer ID] && Sale[Sales Date] >= Lead[Lead Date]  && Sale[Sales Date] <= Lead[Lead Date] +90 ), Sales[Sales ID])

 

Return

if(isblank(_1), false(), True())

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.