Histogram with Percentiles, Mode, Mean and Median

Hi @Ciba ,

The main issue was that the original formula here CASE logic returning unexpected results for Monte Carlo chart percentile line draws the Percentile line if the value falls in the Resolution interval range, but @Kleber_Rocha was using interval dimension with one value range (e.g., 45 - 45). Here is an example formula that would work in such a case:

CASE WHEN
-- left part of the range is equal to the percentile…
-- extract the first element of the range using regex
Val(ExtractString(
  [Resolution interval].CurrentMember.Name,
  "(\d+) - (\d+)",1)
) =
Round(Percentile(
  Filter(
    Descendants([Issue].CurrentMember,[Issue].[Issue]),
    ([Measures].[Issues resolved],
     [Resolution interval].DefaultMember
    ) > 0
  ),
  ([Measures].[Total resolution days],
   [Resolution interval].DefaultMember
  ), 50
))
THEN
--print the percentile at the range
"50th percentile"
END

Lauma / support@eazybi.com

1 Like