Forum Discussion

WAXO's avatar
WAXO
New Member
2 years ago

POWER BI DAX: Generate Normal Distribution based on values selected in the slicer

Hi, I have a data model, where as the Date, Derivatives and Value and Remarks are in the model. I have created measures to calculate Average and Standard DEV given the derivatives selected in the slicer. I have attached the DAX functions below

 

Average = CALCULATE(
    AVERAGE(Py_FEI_TS[Value]),
    Py_FEI_TS[Derivatives] = SELECTEDVALUE(Py_FEI_TS[Derivatives])
)
 
Standard DEV = CALCULATE(
    STDEV.S(Py_FEI_TS[Value]),
    Py_FEI_TS[Derivatives] = SELECTEDVALUE(Py_FEI_TS[Derivatives])
)

With the above information, i want to get a Normal distribution curve for the value of derivatives which i selected in the slicer. While in the current model, the graph i generated based on measures created to calculate the Norm Dist. is having the following error.

Normal Distribution = NORM.DIST(SELECTEDVALUE(Py_FEI_TS[Value]), [Average], [Standard DEV], FALSE())

 

How can i fix the error or is there any alternative ways to get the normal distribution?

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi WAXO

     

    Here are some ideas I've come up with, the error you're experiencing may be due to a single value not being returned, or due to a problem with the calculation or measure.


    First, make sure that the slicer does select and return a single value.

     

    Second, verify that the measure is returning the expected value.

     

    If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

     

    Regards,

    Nono Chen

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