Forum Discussion
% of total
Straight forward question here.....I have read the other incidents related to % of totals and I think mine is similar, but can't figure it out. I have a column named 'Dataset'[count] that is either a 1 or 0. I want to be able to get the count of QuestionNum column (so I Know how many times that question was answered) and also the percentage of 1s of the total. I am assuming that after I have this, I can slicer or filter by the month/year.
I ended up adding two columns. One for No responses [QuestionNumNo] and one for yes responses[QuestionNumYes]. Then used the following to divide the yes's by the total. This seems to work.
QuestionNumPerc = sum('DataSet'[QuestionNumYes]) / (sum('DataSet'[QuestionNumYes])+sum('DataSet'[QuestionNumNo]))
6 Replies
- sumit4732
Advocate II
If i understand your question correctly, you want count and %of total for each Question.
Its quiet simple actually, just pull Question as Values in table, pull count as Values which should take sum by default
and again pull count with sum as summarization type post that right clikc on values and got to show value as and select %of Grand Total
I think this should do it.
Thanks
- joshcomputer1
Helper V
Okay, I added questionNum and Count. It shows the total and then the number of "yes" or 1s. The third column is count again (sum) and I changed it to % of grand total. The issue with that % is that it's a % of total by month. Not the % of total for that month. Still need help to get the percentage.
- Interkoubess
Solution Sage
Hi,
Could you please give us a sample of data in order to compute it.
Thank you.