Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
joshcomputer1
Helper V
Helper V

% 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. Capture1.PNG

 

 

1 ACCEPTED SOLUTION

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]))

 

Capture1.PNG

View solution in original post

6 REPLIES 6
sumit4732
Advocate II
Advocate II

Hi @joshcomputer1

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

 

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. 

 

Capture1.PNG

 

dataset.PNG

Hi @joshcomputer1,

 

Did you try to use 100% stacked column chart? It will show the value as the percent.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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]))

 

Capture1.PNG

Had a similar query - appreciate you sharing the solution, thanks!

Hi,

 

Could you please give us a sample of data in order to compute it.

 

Thank you.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.