{"id":28,"date":"2006-09-21T22:11:30","date_gmt":"2006-09-22T02:11:30","guid":{"rendered":"http:\/\/kenhamady.com\/cru\/archives\/28"},"modified":"2022-08-07T16:31:23","modified_gmt":"2022-08-07T20:31:23","slug":"percentages-in-cross-tabs-that-do-not-round-correctly","status":"publish","type":"post","link":"https:\/\/kenhamady.com\/cru\/archives\/28","title":{"rendered":"Percentages in Cross-tabs that do not round correctly"},"content":{"rendered":"<p>A former student was having trouble adding decimals to the cells of his cross-tab and asked me why. After doing some research I found a problem that I had not noticed before. Cross-tab summaries of Count and DistinctCount that do percentage of total calculations are always truncated to an integer (not rounded). This means that they will not total correctly<!--more--> to 100, although the 100 appears as the total. Worse, there is no way to show more decimal places. This affects v9, v10 and XI but goes away in CR 2008. in V9 you can add decimal places easy enough but they are always zeros. In 10 and XI you can&#8217;t even add the decimals.<\/p>\n<p>For more information on using percentages in Cross-tabs see my related <a title=\"Percentages in Cross-tabs\" href=\"http:\/\/www.kenhamady.com\/news0407.shtml\" target=\"_blank\" rel=\"noopener\">newsletter<\/a> article<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A former student was having trouble adding decimals to the cells of his cross-tab and asked me why. After doing some research I found a problem that I had not noticed before. Cross-tab summaries of Count and DistinctCount that do percentage of total calculations are always truncated to an integer (not rounded). This means that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,5],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-method","category-tips"],"_links":{"self":[{"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":0,"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenhamady.com\/cru\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}