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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
travbum
Advocate I
Advocate I

Adding Columns for results of survey that get zero responses.

This is some data of before and after students take a class:

Question1 BeforeQuestion 1 After
AA
BC
CC
CC
DC
CC
CC
CC
AA
BC

 

Before, students selcted A, B, and C as answers. After most of them realized C was the correct answer. Some still selected A, but none selected B. However, in my final graph, I only can chart A and C. How would I include that B is 0?

1 ACCEPTED SOLUTION
th3h0bb5
Resolver II
Resolver II

If you're willing to change your table layout slightly,  this is fairly simple. Use three columns: Question #, Before, After.

 

Then, you can create a calculated column for each answer type A, B, and C in your Before and After groups:

 

beforeA = IF([Before]="A",1,0)

beforeB = IF([Before]="B",1,0)

beforeC = IF([Before]="C",1,0)

 

afterA= IF([Before]="A",1,0)

afterB = IF([Before]="B",1,0)

afterC = IF([Before]="C",1,0)

 

Finally, then you graph the before and after results.

before after.png

 

 

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@travbum

 

hi, creating a measure like this:

 

COuntQ =
    VAR COUNTING =
        CALCULATE (
            COUNTROWS ( Table2 ),
            FILTER (
                ALL ( Table2 ),
                Table2[Question 1 After] = VALUES ( Table2[Question1 Before] )
            )
        )
    RETURN
        IF ( COUNTING > 0, COUNTING; 0 )

 

and i the visual chart select the fields in this way;

 

counts.png




Lima - Peru
th3h0bb5
Resolver II
Resolver II

If you're willing to change your table layout slightly,  this is fairly simple. Use three columns: Question #, Before, After.

 

Then, you can create a calculated column for each answer type A, B, and C in your Before and After groups:

 

beforeA = IF([Before]="A",1,0)

beforeB = IF([Before]="B",1,0)

beforeC = IF([Before]="C",1,0)

 

afterA= IF([Before]="A",1,0)

afterB = IF([Before]="B",1,0)

afterC = IF([Before]="C",1,0)

 

Finally, then you graph the before and after results.

before after.png

 

 

Helpful resources

Announcements
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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.