Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

Bucket do not return correct amount

Hello, I am using a straight table and creating a calculated dimension using following syntax,

if(balance > 0 and balance <=200000, '>£0 - £200k',
if (balance > 200000 and balance <=400000, '>£200k - £400k',
if (balance > 400000 and balance <=600000, '>£400k - £600k',
if (balance > 600000 and balance <=800000, '>£600k - £800k',
if (balance > 800000 and balance <=1000000, '>£800k - £1m',
if (balance > 1000000, '>1m',
'<£0'))))))

and in expression using count(sales) .

Issue is the total amount it is rendering is incorrect, however when i do count(Distinct Sales) , it returns correct figure.

So somewhere in the above bucketing it is counting wrong (maybe more than one) 

Is my above expression is correct .

Please advise.

Labels (2)
5 Replies
sunny_talwar

Do you need to bucket balance or do you need to bucket Sum(balance) based on  some id? Difficult to know what might be the issue unless you share more details.

ashis
Creator III
Creator III
Author

Hi Sunny,

Thank you for your reply. I want to create bucket, then based on that bucket i want to count some property id ,ie

count(propertyid) .

I am not sure , presently the logic i am using is correct or not. Could you please validate if the logic is right.

sunny_talwar

Validate how? I don't have data, I have  no sample... what do you want me tell you my friend?

ashis
Creator III
Creator III
Author

Hi Sunny,

Validate means - what i mean to say the bucket syntax. If i use it similar fashion , should it work or it could count some duplicate records in the bucket. i have data restriction so afraid to share file. 

I will explore more on it.

Thank you so much .

sunny_talwar

Not really sure how I can help.... all the best!!