Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, Qlik Community.
I have a question about correctly showing total in the chart. In my project, I hide numbers smaller than 5 and replace them with an asterisk (*), using the code (=if (count (Distinct PERSON_UID) <5, '*', count(distinct PERSON_UID)). After hiding the small numbers, I found the total shown in the chart is not correct. It didn't include the small number I hid. See the example below. At the same time, the totals in Pivot tables don't have this issue. Could you help me find a solution? Thank you in advance!
Mulan
My understanding is that a graph's total should total the individual segments, while a table / pivot table's total applies the formula at the Total level (which means it only applies the formula once, and the count(distinct) is greater than five so there's no problem). I believe this means you need the values to be contained within one of the segments in order to be included in the total, and since '*' is not a number, it's not displayed in any of the segments. Perhaps you could instead use the built-in Dimension limitation / Exact Value in order to automatically generate an "Others" segment?
Thank you for your response. I just tried the 'Exact Value' method you recommended. I checked the "Show others" option. The total is correct. However, although I gave the "others" a customized label "Less than 5". It wasn't shown in the legend. Now the race/ethnicity has a "Others" category. This is misleading. Users will be confused about it (long story: there were changes in the definition of race). Do you have a method that I don't need to show the "others" label but the total is still correct? Thanks.