Forum Discussion
zebra
Helper II
2 years agoCreate a measure or dynamic virtual table based on slicer selection that returns table
Hi All, Would you please help in following scenario? I have a table that contains ages and city information as follow. I want to create the normal distribution for the age col...
- 2 years ago
zebra
I've adjusted the calculation. Kindly review the attached file. The chart now aligns with Barcelona as expected in your results. I utilized MAX to capture the current value. The choice of MIN, SUM, or AVG would also suffice since we're dealing with a single value. The crucial aspect is employing an aggregation function to obtain the filter context value.Below is the DAX calculation for NORM.DIST. It now specifically takes into account the current selection by using ALLSELECTED.
Norm.Dist = VAR __Mean = CALCULATE( AVERAGE(Sheet1[Age]) , ALLSELECTED( Sheet1 )) VAR __StdDev = CALCULATE( STDEV.S(Sheet1[Age]) , ALLSELECTED( Sheet1 )) VAR __Result = NORM.DIST( AVERAGE( Sheet1[Age]) ,__Mean ,__StdDev,FALSE()) RETURN __Result
zebra
Helper II
2 years agosure. please post and i will accept it as a solution.
Fowmy
Super User
2 years agozebra
I posted the reply: Re: Calculating Normal Distribution based on selec... - Microsoft Fabric Community