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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
enorthviva
New Member

Excluding a response in pre and post comparison

Hi,

 

I have what is probably a very simple problem to solve.

 

I have a small dataset, which consists of responses to a questionnaire. The questionnaire is taken before and after an intervention, to see changes as a result of the intervention. 

 

In order to compare the "before" and "after" scenarios, I want to exclude those participants who completed a "before" questionnaire but not an "after" questionnaire. Participants each have a unique identifier.

 

Here is a snippet of the dataset:

enorthviva_0-1691490588588.png

 

You can see that in this part of the data, participant 9 (in the "assign number" column) has completed the pre- but not the post-questionnaire, while all others have completed both. How do I exclude participant 9 from the before and after comparisons that I am trying to do?

 

Thank you for your help!

 

1 REPLY 1
whitch
Resolver I
Resolver I

Create this measure:

Exclude =
var aID = SELECTEDVALUE('Table'[What is the childs Assign Number])
return
CALCULATE(COUNTROWS('Table'),'Table'[Is this pre or post survey]="Pre",'Table'[What is the childs Assign Number]=aID)<1
 
Replace 'Table' with the name of your table and everything inside square brackets with whatever column names you actually have.
 
This measure evaluates to TRUE for the rows you want to exclude, so you can filter using this.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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