Percentiles and bucket script does not show data

If I use just percentiles the data will show up but I do not know why when I use the bucket script with percentiles the data will not show up. Please advise.

data:"{
“root_cause”: ,
“type”: “search_phase_execution_exception”,
“reason”: “”,
“phase”: “fetch”,
“grouped”: true,
“failed_shards”: ,
“caused_by”: {
“type”: “aggregation_execution_exception”,
“reason”: “buckets_path must reference either a number value or a single value numeric metric aggregation, but [1] contains multiple values. Please specify which to use.”
}
}"
message:“Unknown elastic error response”
config:Object

@grafana