piechart
1 TopicPiechart diagram based on statistics (percentage calculation)
Dear all, I’m a Data Analysis course student, trying to make a Piechart diagram to represent a sample’s educational background (60.000 people in the sample). There are 5 groups of educational institutions (column [edulvlb] of my table ‘education’: basic education (codes 000,113,129), school diploma holders (codes 212 || 213 || 221 || 222 || 223 || 229 || 311 || 312 || 313 || 321 || 322 || 323), college diploma holders (codes 412 || 413 || 421 || 422 || 423 || 510 || 520), university diploma holders (codes 610 || 620 || 710 || 720) and PhD degree holders (code 800). So I need to count the codes per category (for example, how many times 000,113, 129 appear in column [edulvlb]) and then divide it by total amount of unfiltered rows (about 60.000 rows) of my entire datascheet. Therefore the choice of || which means OR in data selection… So I have divided this process in 2 steps: 1. Basis = CALCULATE (COUNTROWS(education),FILTER ('education',education[edulvlb] = 000 || 113 ||129)) School = CALCULATE (COUNTROWS(education),FILTER ('education',education[edulvlb] = 212 || 213 || 221 || 222 || 223 || 229 || 311 || 312 || 313 || 321 || 322 || 323)) College = CALCULATE (COUNTROWS(education),FILTER ('education',education[edulvlb] = 412 || 413 || 421 || 422 || 423 || 510 || 520)) Uni = CALCULATE (COUNTROWS(education),FILTER ('education',education[edulvlb] = 610 || 620 || 710 || 720)) PhD = CALCULATE (COUNTROWS(education),FILTER ('education',education[edulvlb] = 800)) 2. PercentageBasis = DIVIDE([Basis], Calculate([Basis], ALL('education'))) PercentageSchool = DIVIDE([School], Calculate([School], ALL('education'))) PercentageCollege = DIVIDE([College], Calculate([College], ALL('education'))) PercentageUni = DIVIDE([Uni], Calculate([Uni], ALL('education'))) PercentagePhD = DIVIDE([PhD], Calculate([PhD], ALL('education')) However, the piechart shows 5 segments of totally similar size 20%.. what have I done wrong here..maybe you could advise ?? Looking forward to hearing from you, thank you again for your help !! Best regards, Katia1.6KViews0likes7Comments