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
fess440
Helper III
Helper III

calculate maximum likelihood estimate of exponential parameter in measure/use r function in measure

Hi, is there a power bi function i can use in a measure to calculate maximum likelihood estimate of a parameter for an assumed distribution? i want to use it in a measure as i want the flexibility to slice & dice the data & return output as per selection. presumably the measure will capture the filtered data & hopefully there is some way to use a function to compute some statistics from those values.

 

If there is no such function, is it possible to use a R function within a measure? i am hoping to basically produce the 'estimated parameter' of 2.26 in a matrix as shown in example at bottom of page here by using a function like this:

  eexp(dat, ci=TRUE, conf = 0.9) 

http://search.r-project.org/library/EnvStats/html/eexp.html

 

any ideas? thanks

 

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @fess440,

Perhaps you can take a look at EXPON.DIST function if it meets your requirement:

DAX EXPON.DIST 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
ibarrau
Super User
Super User

Hi, maybe what if parameters can help you. They let you pick values from and to two values you pick up. They you can use the result of that switcher on your measures to simulate scenarios.

https://blog.ladataweb.com.ar/post/189430985473/powerbi-simular-valores-what-if-parameters

Hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

mahoneypat
Employee
Employee

You can probably make a complicated DAX expression to get your result, but if you decide to go the R route, please see this post I wrote a while ago on how to return content from R that is not a visual.

https://powerpivotpro.com/2018/11/hijacking-the-r-visual/

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.