Products | Versions |
---|---|
Spotfire Analyst | All Versions |
case when [myData]<Percentile([myData],25) then "0 - " & Max([myData]) when ([myData]>=Percentile([myData],25)) and ([myData]<Percentile([myData],50)) then MIN([myData]) & " - " & Max([myData]) when ([myData]>=Percentile([myData],50)) and ([myData]<Percentile([myData],75)) then MIN([myData]) & " - " & Max([myData]) when [myData]>=Percentile([myData],75) then MIN([myData]) & " - " & Max([myData]) end
Note: Since this example uses 4 bins the 0, 25, 50, 75, and 100th percentiles are used in the function. If you want different bins, you would modify the percentiles in the Percentile() functions and introduce additional/fewer "when" clauses as needed to match the number of bins.
Doc: Statistical Functions > Percentile