
1. Re: How to divide 2 measures from different grouping?
Ashish Chaudhari May 11, 2016 12:25 AM (in response to Yew Seng Lai)3 of 3 people found this helpfulHi Yew,
Please find the attached screenshot and Formula.
Calc_Penetration
SUM({ FIXED [KPI],[Product Name]: SUM(IF [KPI]="B. Total Profitable Product" then ([Total]) END) })
/
SUM({ FIXED [KPI],[Product Name]: SUM(IF [KPI]="A. Total All Product" then ([Total]) END) })
Thanks and Regards,
Ashish Chaudhari

2. Re: How to divide 2 measures from different grouping?
Ashish Chaudhari May 11, 2016 12:26 AM (in response to Yew Seng Lai)Please find the attached workbook for the same. This is in tableau 9.3 version.
Thanks once again.

Penetration.twbx 19.2 KB


3. Re: How to divide 2 measures from different grouping?
Yew Seng Lai May 11, 2016 1:37 AM (in response to Ashish Chaudhari)Thanks Ashish!

4. Re: How to divide 2 measures from different grouping?
Tharashasank Davuluru May 11, 2016 1:47 AM (in response to Yew Seng Lai)HI,
this

5. Re: How to divide 2 measures from different grouping?
Yew Seng Lai May 11, 2016 2:16 AM (in response to Ashish Chaudhari)Hi Ashish,
Sorry, I have more questions...actually my actual is look like this..how to achieve?
201601 201602 201603 A. Total All Product Product A 1000 2000 2500 Product B 900 1000 1200 B. Total Profitable Product Product A 500 600 700 Product B 400 100 200 Penetration B to A Product A =(500/1000)=50% =(600/2000)=30% =(700/2500)=28% Product B =(400/900)=44.44% =(100/1000)=10% =(200/1200)=16.67% 
6. Re: How to divide 2 measures from different grouping?
Ashish Chaudhari May 11, 2016 2:20 AM (in response to Yew Seng Lai)ok. Give me little time to fix it.

7. Re: How to divide 2 measures from different grouping?
Ashish Chaudhari May 11, 2016 2:27 AM (in response to Yew Seng Lai)Hi Yew,
Please find the solution (.twbx and excel sample data).
SUM({ FIXED [Year],[KPI],[Product Name]: SUM(IF [KPI]="B. Total Profitable Product" then ([Total]) END) })
/
SUM({ FIXED [Year],[KPI],[Product Name]: SUM(IF [KPI]="A. Total All Product" then ([Total]) END) })
Thanks and Regards,
Ashish Chaudhari

Div_two_grps.xlsx 9.0 KB

Penetration.twbx 21.8 KB


8. Re: How to divide 2 measures from different grouping?
Yew Seng Lai May 11, 2016 3:24 AM (in response to Ashish Chaudhari)Thank you!!!
I just started to learn this tool, so glad I can get help from someone master like you so fast!

9. Re: How to divide 2 measures from different grouping?
Yew Seng Lai May 13, 2016 1:02 AM (in response to Ashish Chaudhari)Hi Ashish,
Just wonder can the result display as below? instead have another sheet to only display the %?
I want to append the % data at the bottom part.
201601 201602 201603 A. Total All Product Product A 1000 2000 2500 Product B 900 1000 1200 B. Total Profitable Product Product A 500 600 700 Product B 400 100 200 Penetration B to A Product A 50% 30% 28% Product B 44.44% 10% 16.67% 
10. Re: How to divide 2 measures from different grouping?
Ashish Chaudhari May 13, 2016 1:26 AM (in response to Yew Seng Lai)Hi Yew,
I tried making this possible. Please refer to the screenshot below which I could manage to do. Please find the attached workbook.
I tried setting KPI as null for the calc_Penetration but couldn't do so.
The output is repeated for both the KPI. I am not able to get rid of it.
I have made below changes to the formula. (Removed KPI from the dimension list)
SUM({ FIXED [Year],[Product Name]: SUM(IF [KPI]="B. Total Profitable Product" then ([Total]) END) })
/
SUM({ FIXED [Year],[Product Name]: SUM(IF [KPI]="A. Total All Product" then ([Total]) END) })
Let me know if you made it possible.
Thanks and Regards,
Ashish Chaudhari

Penetration.twbx 30.6 KB
