Forum Discussion
Anonymous
3 years agoNot applicable
DAX Measure (Variable, etc.)
Hello all! I have data laid out like so Milestone Applicants Date Lead 50 6/1/2023 Call 45 6/1/2023 Credit 35 6/1/2023 Banker 30 6/1/2023 CreditCardApprovl 25 6/1/202...
Anonymous
3 years agoNot 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]
)))Manoj_Nair
3 years agoSolution Supplier
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.