12 Replies Latest reply on Oct 11, 2017 6:44 PM by Sherzodbek Ibragimov

# Calculation Help

I am not sure how to phrase this question, but I will give it my best shot.  I have a data set that looks like this:

What I am trying to achieve is the % of ASV's that has only one Region and the % of ASV's that has more than one Region.  I would be expecting to show a PIE chart that is 33% and 67%

ASV ASVAPILIFECYCLEENGINE has 2 distinct Regions, the other two ASV's have 1 distinct Region.

Any help is greatly appreciated.

• ###### 1. Re: Calculation Help

Stepehen,

• ###### 2. Re: Calculation Help

HI, thanks for the help, but I am not getting the desired results, it looks like the it is not fixing on the ASV field, there should only be 653 distinct ASV's in my data set (with certain filters) and of those 379 are in one region and 274 are in more than one region.  I am not sure how to attached my workbook, but here is my screen shot.

• ###### 4. Re: Calculation Help

Hi Stephen

Check out this post and follow the instructions for #1

I think that may give a good framework to build off of

• ###### 5. Re: Calculation Help

• ###### 6. Re: Calculation Help

Figured it out, sorry, I was replying from the INBOX not the thread.

• ###### 7. Re: Calculation Help

Sorry, figured it out.

• ###### 8. Re: Calculation Help

Can you please save it as twbx (which means = twb file +underlying data) ? I can't do nothing with twb file. Thank you

• ###### 9. Re: Calculation Help

Here you go, sorry.

• ###### 10. Re: Calculation Help

You can use a CASE statement as below and that should give you a field that will in turn help create the pie-chart.

CASE {fixed [ASV]:COUNTD([Region])}

WHEN 1 THEN 'ONE'

ELSE

'MORE THAN ONE'

END

• ###### 11. Re: Calculation Help

Got me closer, but can you explain why this one is showing as More Than One when there is only one region?

• ###### 12. Re: Calculation Help

Sorry for a late reply. After checking your data structure, this calculation should direct you to right path:

Let me know if it doesn't.