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
mmoroni
Helper I
Helper I

Create a custom measure

Looking for help on a measure column

I currently have 2 columns in a BI report.  I would like to get a calculation to show the "take rate" by doing a custom measure to take the "distinct count" of account number (current customers) DIVIDED BY # of units potential.  I want to display this as a %.

 

IE, if I have 7 distinct account numbers, and iut has # of potentials to be 14, I want a result of 50%

10 distinct account num,bers with 100 potential should equal 10%.

 

'MDU BI Elations'[Account Number]     (must be a distintc count)
'MDU LOCATIONS Smart Sheet'[# of units potential]
1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @mmoroni ,

If you have each column for each table, you can create a measure like this:

RE = 
DISTINCTCOUNT ( 'MDU BI Elations'[Account Number] )
    / SUM ( 'MDU LOCATIONS'['# of units potential] )

percen.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yingjl
Community Support
Community Support

Hi @mmoroni ,

If you have each column for each table, you can create a measure like this:

RE = 
DISTINCTCOUNT ( 'MDU BI Elations'[Account Number] )
    / SUM ( 'MDU LOCATIONS'['# of units potential] )

percen.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That did the trick.  I had something similiar (maybe even teh same), but had results as "infinity".  Now that I look at iut, if I have SOMETHING divided by nothing, it would toss up an odd answer.

Thank you!

vanessafvg
Super User
Super User

you could try something like this

 

% of units potential =
VAR accounts =
    CALCULATE ( DISTINCTCOUNT ( table[accountnumber] ) )
RETURN
    FORMAT ( DIVIDE ( accounts, unitsofpotential, 0 )"Percent" )





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Not quite letting me.

% of units potential =
VAR accounts =
CALCULATE ( DISTINCTCOUNT ('MDU BI Elations'[Account Number]))
RETURN
FORMAT ( DIVIDE (accounts, 7,0), "Percent" )
The "7" is where I am trying to enter, 'MDU LOCATIONS Smart Sheet'[# of units potential]  But it doesnt allow.

ok so these are sitting in different tables? you need to share some sample data in text format please.

I would need to seee both tables.

 

also do your tables have a relationship between them?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.