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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Berl21
Helper III
Helper III

DAX: write a measure that corrects conversion rate to a 100%

Hi,

I have the following issue:

A lead can generate 2 or more opportunities, or never convert. I want to compute the conversion rate of leads into opportunities but not take into account all the additional opportunities after the 1st one.

For instance, I have the following:
Lead A generates 34 opportunities
Lead B generates 0 opportunities
Lead C generates 1 opportunity

Lead A and C should generate a 100% CR, Lead B a 0%.

I am thinking there is a way to write an if statement in DAX, in the likes of if CR > 100%, then write 100%. But I am not sure exactly how and which functions to use.

Can anyone help out?

Thanks,

Pauline.



1 REPLY 1
john_mulqueen
New Member

Might need some more details to give you a good answer, but I'm assuming you have something like this in a table

 

Distinct count =
CALCULATE ( DISTINCTCOUNT ( 'Table'[Lead] ), 'Table'[Status] = "Converted" )

 

 

LeadOpportunityStatus
AA_1Converted
AA_2Converted
AA_3Converted
AA_4Converted
AA_5Converted
AA_6Converted
AA_7Converted
AA_8Converted
AA_9Converted
AA_10Converted
AA_11Converted
AA_12Converted
AA_13Converted
AA_14Converted
AA_15Converted
AA_16Converted
AA_17Converted
AA_18Converted
AA_19Converted
AA_20Converted
AA_21Converted
AA_22Converted
AA_23Converted
AA_24Converted
AA_25Converted
AA_26Converted
AA_27Converted
AA_28Converted
AA_29Converted
AA_30Converted
AA_31Converted
AA_32Converted
AA_33Converted
AA_34Converted
BB_1Not Converted
CC_1Converted

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Top Solution Authors