tableau-desktopcalculated-field

Tableau calculated field


I have data table with the total of health insurance coverage per state for the period of 5 years, so I created a calculated field that calculates the yearly coverage per state by using the divide statement to calculate for that in this way div(health insurance coverage,5) and I titled it Yearly coverage per state and this worked as a measure.

The next step I want to execute for my analysis is to create another calculated field using the Yearly coverage measure to divide the Health insurance coverage to give the coverage rate per state for 5 years. I tried this sum(Yearly coverage per state)/sum(Health insurance coverage), the calculation is valid but when I drag the new field to row section and drag the states field to the column section of my viz, it gives me one figure which is 0.20 for all states and that isnt what I am looking for. I tried it without the sum statement and its the same, tried both fields inside the divide statement and its giving me 0 for all states. I need it to calculate the individual health insurance coverage rate using that formula above. Please help!


Solution

  • here is the situation:your formula seems to be a circular reference. i mean if you perform [Yearly insurance coverage per state]/[Health Insurance Coverage Change 2010-2015] then you are just repeating the same calculation : [Health Insurance Coverage Change 2010-2015]/5, because divide by 5 will result in 20% for all the records. Is there any other formula that you are using , are the fields correct ? enter image description here