Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I am new to Power BI and I am looking for some help on how to transform Pass/Fail Question data so I can display the responses in a Power BI bar chart. I have an excel file with six columns Site Name, Date, Assessor, Question 1, Question 2 and Question 3.
My objective is to Transform the data by adding the pass/fail values for each of the Question columns and displaying a bar chart with each of the totals broken down by site name. Ideally, the bar chart would include a Site Name on the X axis and either a stacked bar (Pass and Fail) or two bar values (Pass and Fail) for each of the Sites on the Y Axis.
Solved! Go to Solution.
select the first three columns and unpivot other columns. then it will be easier for you to do the calculation
Proud to be a Super User!
Hi @egghead - In Power Query editor, transform tab--> Unpivot the Question Columns
To reshape your data, you will need to unpivot the Question columns:
close and apply the changes in power query editor,
Using dax, create an measure for pass as below:
Total Pass = CALCULATE(COUNT('Table'[Result]), 'Table'[Result] = "Pass")
another measure for fail:
Total Fail = CALCULATE(COUNT('Table'[Result]), 'Table'[Result] = "Fail")
Now you can choose bar chart to display the pass/fail count for each site.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Thank you @rajendraongole1 so much for your assistance!!! With your assistance I was able to create the desired report:
Hi @egghead - In Power Query editor, transform tab--> Unpivot the Question Columns
To reshape your data, you will need to unpivot the Question columns:
close and apply the changes in power query editor,
Using dax, create an measure for pass as below:
Total Pass = CALCULATE(COUNT('Table'[Result]), 'Table'[Result] = "Pass")
another measure for fail:
Total Fail = CALCULATE(COUNT('Table'[Result]), 'Table'[Result] = "Fail")
Now you can choose bar chart to display the pass/fail count for each site.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
select the first three columns and unpivot other columns. then it will be easier for you to do the calculation
Proud to be a Super User!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 111 | |
| 109 | |
| 40 | |
| 33 | |
| 26 |