英文:
Check the data quality in Google Sheets (asking for suggestions)
问题
我试图创建一个表格来检查Google表格中调查数据的质量,文档的格式如下:
所以基本上我在使用这个公式=COUNTIF(B2:F2,"Don't know")
来计算Don't know
,空格,0和大于9的数字,如果计数的百分比大于0.31或31%,则数据质量不好,举个例子,我将采用第2行
,它在B-F列中有响应(5个单元格),这是响应的总数,不良数据的计数是2,所以以百分比表示质量为2/5 = 40%
,但我希望对所有1600个问题的调查问题执行相同操作,此文档,附带的文档包含原始调查数据的一小部分。所以我想请教一个更好的解决方案,而不是计算所有列和行,我想要一个建议或者应该如何检查数据质量,基本上在文档中我有所有我需要的公式,但我希望把所有的公式放在一个公式中。此外,在文档的期望输出列中,有我希望得到的最终结果。希望我的解释对于所需的输出是清楚的。
英文:
I'm trying to create a sheet to check the data quality from a survey in Google Sheets the document have this format:
So basically I was using this formula =COUNTIF(B2:F2,"Don't know")
to count Don't know
, empty spaces, 0's and numbers > than 9, if the percentage from the counts is bigger than 0.31 or 31% the data quality is not good, as an example I'll take row 2
, it has responses from Column B-F (5 cells) and this is the total number of responses, the count of bad data is 2, so in percentage will be represented the quality as 2/5 = 40%
, but I want to do the same for the all survey questions in a survey with 1600 questions, this document,the document attached contains a small piece of data from the original survey. So I would like to ask for a better solution that counting all the columns and the rows, I'm asking for a recomendation or how I should check the data quality, basically in the document I have all the formulas that I need but I would like to have all the formulas in just one. Also in the document in the desirable output column there is the final result that I would like to have. Hoping my explanaiton was good about the desired output.
答案1
得分: 0
首先清除范围G2:J21
和L2:M21
中的所有内容。
现在可以在单元格G2
和L2
中分别尝试以下两个公式。
至于K2
列,它已过时,因为它是一个固定的数字(数字5),很容易包含在第二个公式中
在单元格G2
中尝试以下公式:
=INDEX(IF(A2:A21="",,
{BYROW(B2:F21,LAMBDA(zz,{COUNTIF(zz,"Don't know"),COUNTBLANK(zz)})),
BYROW(F2:F21,LAMBDA(xx,{COUNTIF(xx, 0),COUNTIF(xx, ">9")})})))
在单元格L2
中尝试以下公式:
={INDEX(IF(A2:A21="",,
LET(vv,BYROW(G2:J21,LAMBDA(ww,SUM(ww)/5)),
{vv,INDEX(IF((vv<= 0.3),"Good Quality",IF(vv>0.31,"Bad Quality",)))})))}
(根据您的范围和区域设置,请调整公式)
英文:
First of all clear everything in ranges G2:J21
and L2:M21
You can now try the following 2 formulas in cells G2
and L2
respectively.
As for column K2
, it becomes obsolete since it is a fixed number (number 5) that is easily incorporated within the 2nd formula
in cell G2
try
=INDEX(IF(A2:A21="",,
{BYROW(B2:F21,LAMBDA(zz,{COUNTIF(zz,"Don't know"),COUNTBLANK(zz)})),
BYROW(F2:F21,LAMBDA(xx,{COUNTIF(xx, 0),COUNTIF(xx, ">9")}))}))
in cell L2
try
={INDEX(IF(A2:A21="",,
LET(vv,BYROW(G2:J21,LAMBDA(ww,SUM(ww)/5)),
{vv,INDEX(IF((vv<= 0.3),"Good Quality",IF(vv>0.31,"Bad Quality",)))})))}
(Do adjust the formulae according to your ranges and locale)
答案2
得分: 0
你可以尝试这个公式:
=byrow(B2:F,lambda(z,if(offset(index(z,,1),0,-1)="",,
let(x,(countif(z,"Don't Know")+countblank(z)+--(index(z,,5)=0)+--(index(z,,5)>9))/columns(z),
if(x>0.3,"差","好")&" 质量"))))
如果你希望在质量状态旁边看到分数,可以使用以下公式:
=byrow(B2:F,lambda(z,if(offset(index(z,,1),0,-1)="",,
let(x,(countif(z,"Don't Know")+countblank(z)+--(index(z,,5)=0)+--(index(z,,5)>9))/columns(z),
{to_percent(x),if(x>0.3,"差","好")&" 质量"})))
英文:
You may try this:
=byrow(B2:F,lambda(z,if(offset(index(z,,1),0,-1)="",,
let(x,(countif(z,"Don't Know")+countblank(z)+--(index(z,,5)=0)+--(index(z,,5)>9))/columns(z),
if(x>0.3,"Bad","Good")&" Quality"))))
if you wish to see the score alongside the quality status then use:
=byrow(B2:F,lambda(z,if(offset(index(z,,1),0,-1)="",,let(x,(countif(z,"Don't Know")+countblank(z)+--(index(z,,5)=0)+--(index(z,,5)>9))/columns(z),{to_percent(x),if(x>0.3,"Bad","Good")&" Quality"}))))
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论