I got a table with lots of prices which I calculate by the revenue and the quantity. Now I want to split theses prices by the fractile function and aggregate them by one or two dimensions (product (and department)).
Department
Product
Revenue
Quantity
Price
q(75%)
A
123
120
2
60
67,50
A
123
210
3
70
67,50
B
234
17
1
17
19,25
B
234
40
2
20
19,25
It should look like that but I don't know how to do it.