Forum Discussion
MiKeZZa
9 years agoPost Patron
Create Pie chart with group by
Hi all, I have a dataset like this: emp nr year_month uniquenumber 161860 201702 25005 161860 201702 25006 161860 201703 25007 365630 201702 25008 365...
MiKeZZa
9 years agoPost Patron
Hi v-huizhn-msft thanks for you're patience.... But something goes wrong. I now have:
numberofcategories = CALCULATE(SUM('table name'[empnr]),ALLEXCEPT('table name','table name'[empnr],'table name'[costcenter]))
incidentcount = sum('table name'[numberofincidentsinmonth])
percentage = CALCULATE(COUNTAX(DISTINCT(SELECTCOLUMNS('table name',"empnr",'table name'[empnr],"num",'table name'[numberofcategories])),'table name'[incidentcount]),ALLEXCEPT('table name','table name'[numberofcategories]))/CALCULATE(COUNTAX(DISTINCT(SELECTCOLUMNS('table name',"empnr",'table name'[empnr],"num",'table name'[numberofcategories])),'table name'[incidentcount]),ALL('table name'))And this results in this piechart:
I'm pretty sure I've done everything that you suggest, but it's clear that something is wrong.
v-huizhn-msft
9 years agoMicrosoft Employee
Hi MiKeZZa,
In this chart, it seems that you post your table[emp nr ] as Lengend, please post table[numberofcategories] as lengend. And do you create measure your calculated column?
Best Regards,
Angelia
- MiKeZZa9 years agoPost Patron
Hi Angelia,
I really don't understand you're questions. What do you mean with Lengend? And 'do you create measure your calculated column'?
Sorry, I'm really desperate for help, but don't understand what you're asking...