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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Create table where each row shows grouped data from a different column in the dataset

I need to create some tables that show survey response data to different questions all in the same table.

 

The results for each question are in their own column in the dataset. Each row represents shows data from a different column in the dataset.

For this example, each question has 7 answer options (numbers 0-6). 

The result that i want to show is the count of the grouped answers (5+6) /count of total number of answers.

In excel my formula for this is: =COUNTIF(Survey[question],">=5")/COUNT(Survey[question])

 

This is what i have in excel and want to recreate:

PBI-Tabledata.png

 

I can create a table in Power BI for a single question (column of data) - and i know how to group the answer options and have these show as a percent of the total number.

I don't know how to only show one of these 'groups' and have the % stay the same.

If i remove the other groups and only show one, then the % changes to 100%.

PBI-table.png

Is this doable?

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Assume your dataset is like

1.png

Create measures, then add columns and measures to the table visual

count of the grouped answers (5+6) =
CALCULATE (
    COUNT ( Sheet1[answer] ),
    FILTER ( ALLEXCEPT ( Sheet1, Sheet1[question] ), [answer] >= 5 )
)

count of total number = CALCULATE(COUNT(Sheet1[answer]),ALLEXCEPT(Sheet1,Sheet1[question]))

percent = [count of the grouped answers (5+6)]/[count of total number]

2.png

 

 

Best Regards

Maggie

TomMartens
Super User
Super User

Hey,

unfortunately I do not understand the layout of your table(s), for this reason it's difficult to provide you any meaningful hints.

 

Maybe this link gets you started:

https://www.daxpatterns.com/survey/

 

If you need mor help, upload you pbix file to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Thanks for the feedback Tom.

I'll have a go at editing the original question to see if i can do any better.

Hi @Anonymous

Does TomMartens' suggestion really help you, if so, could you kindly accept his answer as a solution?

If not, please feel free to ask any question.

It would be better for analysis of you to provide an example table.

 

Best regards

Maggie

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors