I have categorical data and I'm trying to show percent of total for a category as text:
Below, I want to show percent of 1s specifically (the other rows are typically hidden, but unhidden here for illustration).
Toward this goal I am using a calculated field with formula:
zn(SUM(if [Q1a] == 1 then [Number of Records] end) / TOTAL(SUM([Number of Records])))
My issue is that when there are no rows with 1s in the relevant column, text is entirely missing as opposed to showing 0:
This is especially weird since the ZN() function seems to work for other values and shows 0.0%.
Any help would be appreciated.
Have you tried this setting?
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...