Reputation: 323
I am trying to create a simple formula for calculation in table .
This is the table structure
EXPERIENCE PLATFORM REVENUE
PC WEBSITE 100
MOBILE ANDROID 20
MOBILE IPAD 10
MOBILE IPHONE 20
My calculation is trying to find the share :
Calc1: Share of site= sum of revenue from mobile / sum of revenue (mobile+PC)
Calc2: share of platform= sum of revenue from apps/revenue from mobile
Can someone highlight how I can create a formula , I am very new to tableau.
Thanks
Upvotes: 0
Views: 419
Reputation: 143
For Calc1, try a calculated field like: sum(iif([Experience]='MOBILE',[Revenue],0))/sum([Revenue])
Calc2 uses similar logic: sum(iif([Platform]='ANDROID',[Revenue],0))/sum(iif([Experience]='MOBILE',[Revenue],0))
You should also be able to get what you need using the Tableau built in table calculations, by dragging in what you need and adjusting filters as necessary.
Upvotes: 0