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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX Measure (Variable, etc.)

Hello all! I have data laid out like so

MilestoneApplicantsDate
Lead506/1/2023
Call456/1/2023
Credit35

6/1/2023

Banker306/1/2023
CreditCardApprovl256/1/2023
Close206/1/2023

The goal is for me to write a DAX measure which will show the Lead Milestone Conversion for these applicants. The desired outcome would be the conversion (and I included how it'd be calculated next to it)

ConversionCalculation
100%50/50
90%45/50
70%35/50
60%30/50
50%25/50
40%20/50

I am kind of torn on the DAX syntax to use. I'm thinking designating a variable to signify that we divide every milestone by the Lead totals would make sense, but I am torn.

3 REPLIES 3
Manoj_Nair
Solution Supplier
Solution Supplier

@Anonymous @ Try this and let me know if this works.

 

Lead Milestone Conversion = 
DIVIDE(
    CALCULATE(
        SUM('Table'[Applicants]),
        'Table'[Milestone] = "Lead"
    ),
    CALCULATE(
        SUM('Table'[Applicants]),
        'Table'[Milestone] = "Lead" || 'Table'[Milestone] = "Call" || 'Table'[Milestone] = "Credit" || 'Table'[Milestone] = "Banker" || 'Table'[Milestone] = "CreditCardApprovl" || 'Table'[Milestone] = "Close"
    )
)

If this post helps to find solution would be happy if you could mark my post as a solution and give it a thumbs up

Best regards

Manoj Nair

Linkedin - https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/

 

Anonymous
Not applicable

Hello!

So I got it to work! However for some reason it does not with my date slice

TESTING CONVERSION METRIC = 
DIVIDE(
    CALCULATE(
        SUM('Table'[AllIn]),
        ALLEXCEPT('Table',
        'Table'[Milestone])
    ),
    CALCULATE(
        'Table'[Leads],
        ALLEXCEPT('Table', 'Table'[Milestone]),
        ALL('Table'[Milestone]
    )))

@Anonymous- Try this one.

 

 

TESTING CONVERSION METRIC = 
VAR SelectedDate = MAX('Table'[Date])   // Get the selected date from the slicer
RETURN
DIVIDE(
    CALCULATE(
        SUM('Table'[AllIn]),
        ALLEXCEPT('Table', 'Table'[Milestone]),
        'Table'[Date] = SelectedDate   // Apply the selected date filter
    ),
    CALCULATE(
        'Table'[Leads],
        ALLEXCEPT('Table', 'Table'[Milestone]),
        'Table'[Date] = SelectedDate,   // Apply the selected date filter
        ALL('Table'[Milestone])
    )
)

 

I updated the measure. Uses the MAX function to retrieve the selected date from the slicer and assigns it to the variable SelectedDate. Then, in both CALCULATE functions, the condition 'Table'[Date] = SelectedDate is added to filter the data based on the selected date.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.