Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Rajesh31
Contributor III
Contributor III

Decile fuction

Hi , Can some one help me with below one 

I tried creating a column for decile bucket using following code in load editor

if (revenue_amount<=Fractile(sum(revenue_amount),0.1,'D1',

if (revenue_amount<=Fractile(sum(revenue_amount),0.2,'D2',

if (revenue_amount<=Fractile(sum(revenue_amount),0.3,'D3',

if (revenue_amount<=Fractile(sum(revenue_amount),0.4,'D4',

if (revenue_amount<=Fractile(sum(revenue_amount),0.5,'D5',

if (revenue_amount<=Fractile(sum(revenue_amount),0.6,'D6',

if (revenue_amount<=Fractile(sum(revenue_amount),0.7,'D7',

if (revenue_amount<=Fractile(sum(revenue_amount),0.8,'D8',

if (revenue_amount<=Fractile(sum(revenue_amount),0.9,'D9','D10')))))))))) as Decile_bucket

It is throwing an error of nested aggregration not allowed while loading the data 

What Iam trying to acheive is to create an equaly distributed decile bucket of Revenue_amount as dimension , I seek your guidance

 

 

@sunny_talwar @swuehl 

Labels (4)
10 Replies
Rajesh31
Contributor III
Contributor III
Author

what is the change I need to make for below formula to create a dimention thorugh variable

if (revenue_amount<=Fractile(sum(revenue_amount),0.1  ),'D1',

if (revenue_amount<=Fractile(sum(revenue_amount),0.2 ),'D2',

if (revenue_amount<=Fractile(sum(revenue_amount),0.3  ) ,'D3',

if (revenue_amount<=Fractile(sum(revenue_amount),0.4 ),'D4',

if (revenue_amount<=Fractile(sum(revenue_amount),0.5 ) ,'D5',

if (revenue_amount<=Fractile(sum(revenue_amount),0.6 ) ,'D6',

if (revenue_amount<=Fractile(sum(revenue_amount),0.7 ),'D7',

if (revenue_amount<=Fractile(sum(revenue_amount),0.8,'D8',

if (revenue_amount<=Fractile(sum(revenue_amount),0.9,'D9','D10')))))))))) as Decile_bucket