Forum Discussion
MTrullàs
4 years agoHelper III
Percentile
Hi everybody! I want to calculate column D in this example with DAX. I try to do it with this code, but I have some mistakes in the results. Percentil Fábrica = VAR Totalco...
- 4 years ago
Ok. That is different from what I had understood earlier. See it all at work in the attached file:
NewMeasure = VAR total_ = CALCULATE ( COUNT ( Table1[Estancia Fábrica] ), ALL ( Table1 ) ) VAR currentEst_ = SELECTEDVALUE ( Table1[Estancia Fábrica], total_ ) VAR cumul_ = CALCULATE ( COUNT ( Table1[Estancia Fábrica] ), Table1[Estancia Fábrica] <= currentEst_, ALL ( Table1 ) ) RETURN DIVIDE ( cumul_, total_ )Please accept the solution when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
AlB
4 years agoCommunity Champion
Ok. That is different from what I had understood earlier. See it all at work in the attached file:
NewMeasure =
VAR total_ = CALCULATE ( COUNT ( Table1[Estancia Fábrica] ), ALL ( Table1 ) )
VAR currentEst_ = SELECTEDVALUE ( Table1[Estancia Fábrica], total_ )
VAR cumul_ =
CALCULATE (
COUNT ( Table1[Estancia Fábrica] ),
Table1[Estancia Fábrica] <= currentEst_,
ALL ( Table1 )
)
RETURN
DIVIDE ( cumul_, total_ )
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
MTrullàs
4 years agoHelper III
Thank you very much for your time. The solution is perfect!