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
Darko_Giac
Helper II
Helper II

Creating Conditional Columns Filtered Within Rows

Hi all,

 

I'm currently working with a fairly large data set (for which I included a sample), and am having some issues developing a flags that will filter within rows.

 

For example, I'm currently analyzing test data that requires students take a test at one time, then come back to take the test again at another, later date. So Student 101 would have two entries across a few variables:

 

 

However, there a couple of conditions I'm trying to build in:

 

1). The re-test can't have happened two weeks BEFORE the initial test, or four weeks AFTER.

 

2). I'm also looking to flag discrepencies within IDs and TestStart and EndTimes (for example, both test start and test end should occur on the same day, as the test duration is only a few hours).

 

So ID101 would have a "Invalid Case" flag, as more than four weeks have elapsed between test and retest

 

I have a feeling this is something that could be more effectively done in power pivot, but just not quite sure how to get there.

 

(The data in the attached workbook is also connected to powerpivot)

 

 

Test Retest Workbook

 

Currently using Office 365 ProPlus.

 

Any help is greatly appreciated, thanks in advance!

 

Darko

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my solution workbook from here.

 

Hope this helps.

 

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my solution workbook from here.

 

Hope this helps.

 

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks for the solution @Ashish_Mathur!

 

The time/date flag worked really well.

 

I'm wondering whether there is a way to create a gender flag (either through a measure or calculate column) that will flag mismatches in gender between the same ID. 

 

For example,

 

My data are set up so that each ID has two entries, and ID101 for instance might have a gender of Male on one row, but Female on the next row. 

 

Would there be a way to flag those discrepancies?

 

See attached a workbook: Workbook_11.24.2018

 

Thanks again for the help!

 

Darko

Hi,

 

You are welcome.  I receive a message saying "Download not available"


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.