Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Kushal_Chawda

Deciles Calculation On script

Dear All,

For calculating deciles, I am using the below expression which is working file on charts with all dimensions

if(Profit <= fractile(TOTAL Profit, 0.1), 10,

if(Profit <= fractile(TOTAL Profit, 0.2), 9,

if(Profit <= fractile(TOTAL Profit, 0.3), 8,

if(Profit <= fractile(TOTAL Profit, 0.4), 7,

if(Profit <= fractile(TOTAL Profit, 0.5), 6,

if(Profit <= fractile(TOTAL Profit, 0.6), 5,

if(Profit <= fractile(TOTAL Profit, 0.7), 4,

if(Profit <= fractile(TOTAL Profit, 0.8), 3,

if(Profit <= fractile(TOTAL Profit, 0.9), 2, 1)))))))))

Please let me know how the same can be achieved from script?

1 Reply
tresesco
MVP
MVP

Using Group By. Try to share a sample app with inline data and explain expected output.