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.
Hi,
I'm doing okay with Power M Query, but DAX is just plain confusing to me.
I am trying to measure the conversion rate of my sales funnel:
Columns available are:
The formula I'm running is:
Conversion Rate = DIVIDE(CALCULATE(COUNT('Admissions'[user_id]),FILTER(ALLSELECTED(Admissions),Admissions[applicant_status_order] = 8)),CALCULATE(COUNT('Admissions'[user_id]),FILTER(ALLSELECTED(Admissions),Admissions[applicant_status_order] > 0)),0)
However, placing this measure on card visual returns 0.
How can I get this to be a % with a value?
Solved! Go to Solution.
Okay I just found the solution on https://stackoverflow.com/questions/38353064/how-to-format-new-measure-not-column-in-power-bi-as-per...
I needed to bracket this into a FORMAT( [my calculation], "0.00%").
Hi,
Share some data and show the expected result.
Hi there:
Measure 1 = CALCULATE(COUNT('Admissions'[user_id]),FILTER(ALLSELECTED(Admissions),Admissions[applicant_status_order] = 8))
>> Returns 28
Measure 2 = CALCULATE(COUNT('Admissions'[user_id]),FILTER(ALLSELECTED(Admissions),Admissions[applicant_status_order] > 0))
>> Returns 828
Conversion Rate = DIVIDE(CALCULATE(COUNT('Admissions'[user_id]),FILTER(ALLSELECTED(Admissions),Admissions[applicant_status_order] = 8)),CALCULATE(COUNT('Admissions'[user_id]),FILTER(ALLSELECTED(Admissions),Admissions[applicant_status_order] > 0)),0)
Okay I just found the solution on https://stackoverflow.com/questions/38353064/how-to-format-new-measure-not-column-in-power-bi-as-per...
I needed to bracket this into a FORMAT( [my calculation], "0.00%").
@benjamin_sasin wrote:
I needed to bracket this into a FORMAT( [my calculation], "0.00%").
I would not recommend doing this as this will convert your measure from a number to a string which limits the ways in which it can be used (you can't put string measures into charts that require numeric values which is nearly every chart type except for cards and tables)
A better solution is to click on the measure then on the "Measure Tools" (if you are using the old ribbon these options are in the "Modeling" tab)
And then click on the % option (and you can optionally change the number of decimal places using these formatting options also)
In this way the measure will retain it's numeric value and can be used in all types of charts and visuals, but when displayed as text it will use the specified format.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
108 | |
88 | |
75 | |
66 |
User | Count |
---|---|
125 | |
114 | |
98 | |
81 | |
73 |