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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Ayupchap
Helper III
Helper III

Comparing a result to another

OK this is a little difficult for me to explain but I shall do my best.

 

I have linked to a database as mysource and using POwerBI to carry out my dashboards, so far this is going excellent.  I am now trying to create a dashboard which shows how many students got a question correct over those that didn't. Now the iss ue I am having is this, the resulst are in the form of a letter A, B, C or D they are multiple choice questions.  In the database it has the students answer and also in the column next to it the correct answer.  The issue is how can I show in my report who got it right or not? Is there anyway in PowerBI to let it knwo that the correct answer needed is say B so it knows for that question the answer is B or if its wrong it would know that.  Is there anyway to represent this within PowerBI?

1 ACCEPTED SOLUTION
drewlewis15
Solution Specialist
Solution Specialist

You need to add a custom column with the following statement (alter based on your field names):

 

if [Correct Answer] = [Student Answer] then "Correct" else "Incorrect"

 

Your end result will look something like this:

student.jpg

View solution in original post

2 REPLIES 2
drewlewis15
Solution Specialist
Solution Specialist

You need to add a custom column with the following statement (alter based on your field names):

 

if [Correct Answer] = [Student Answer] then "Correct" else "Incorrect"

 

Your end result will look something like this:

student.jpg

Oh this is great, thanks so much!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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