7 Replies Latest reply on Jan 21, 2019 11:03 PM by Yvonne Cheng

# Do Arrgegation on grouping dimension

Hi All,

I would like do calculate ratio based on vessel name grouping. (pls refer to attached sample data)

Firstly I would like to group vessel name. Kota Carum and Kota Cempaka are group A. The rest is group B.

Then calculate ratio (COUNTD(observation) / COUNTD (report number)) based on group A, group B and all (vessels).

I want a view like this:

 Ratio (Group A) Ratio (Group B) Ratio (All) 1.5 0.5 0.83

I tried this formula, but it did not work out.

Appreciate you could help me.

Best Regards

Yvonne

• ###### 1. Re: Do Arrgegation on grouping dimension

Let me know how you are trying to calculate All. I have calculated Grp A and Grp B Ratios.

• ###### 2. Re: Do Arrgegation on grouping dimension

Hi, Yvonne

Please find my solution attached. below is the screenshot for your reference.

Hope this helps

ZZ

• ###### 3. Re: Do Arrgegation on grouping dimension

Dear Zhouyi,

Thanks for your reply. Actually there are more fields in the view. And maybe calculation 1 will not work due to format. Sorry I did not give you a full picture.

This is what I am working on. Target is  a fixed number. Result compare target and Ratio (All).

Thank your for your help. And it is so nice to hear from tong bao on tableau forum for first time.

I dun know how to attach sample in this reply. If you need it, pls let me know.

Best Regards

Cheng Ying

• ###### 4. Re: Do Arrgegation on grouping dimension

Hi Zhouyi,

I tried again and managed to do it.

Thanks for heads up on thinking on LOD function.

Best Regards,

Cheng Ying

• ###### 5. Re: Do Arrgegation on grouping dimension

Hi Zhouyi,

I tried again and managed to do it.

Thanks for heads up on thinking on LOD function.

Best Regards
Cheng Ying
• ###### 6. Re: Do Arrgegation on grouping dimension

Cool ~~~ Glad you manage to achieve it.

ZZ

• ###### 7. Re: Do Arrgegation on grouping dimension

Hi Zhouyi,

Thanks. I have marked correct answers.

Best Regards

Cheng Ying

发自我的 iPhone

在 2019年1月21日，下午7:30，Zhouyi Zhang <tableaucommunity@tableau.com> 写道：

Tableau Community Forums

Do Arrgegation on grouping dimension

reply from Zhouyi Zhang in Forums - View the full discussion

Cool ~~~ Glad you manage to achieve it.

ZZ

Reply to this message by replying to this email, or go to the message on Tableau Community Forums

Start a new discussion in Forums by email or at Tableau Community Forums

Following Do Arrgegation on grouping dimension in these streams: Inbox

This email was sent by Tableau Community Forums because you are a registered user.

You may unsubscribe instantly from Tableau Community Forums, or adjust email frequency in your email preferences