What's the actual question? I see you have an IF statement here, is that different to the case statement you're trying to build?
I really think you'd benefit from creating a sample and uploading a Tableau Packaged Workbook.
Hey Tom - Question was how to create a CASE statement to return a % of total based on a certain delivery type. I have the IF statement as my starting point, but wasn't giving me the results I was looking for.
I have since created 4 calculations - one to return # of c-sections, one to return # of vaginal deliveries, one to calculate the % of c-sections based on total deliveries and then the last one to compare against the parameters.
I've attached the basic data I'm working with. My goal is to have Year then a column for the c-section % for the year and then a KPI indicator if it is within a certain range.
Ranges: Goal - 18%; Target - 12%; Reach - 8%
Tablea Public Delivery KPI.twbx 24.0 KB