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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Agustina
Frequent Visitor

Conditional column from Many to One

Hello colleagues,

 

I have these 2 tables:

2021 Cases - unique records (clients)

2021 Online Q - each client has multiple rows, one per topic, with a status (responsecasestatus) and a date.

 

Agustina_1-1616533333081.png

 

I want to create a calculated column on the 2021 Cases that would bring me the Last Modified date for that client, once there are no rows-Topic on status "Waiting for Corrections". It's crucial that all records for that client have other status.

 

The Last Modified date can be different for the same client, as it varies by Topic. I would want to flag the most recent one.

 

The 2021 Online Q table looks like this:

Agustina_0-1616585964198.png

 

So we have different topics for each participant ID, each topic can have the status:

Waiting for Corrections

Waiting for Review

Review in Progress

 

I want to bring a calculated column on the clients table, with the last modified date per client id, only once I have no other rows on Waiting for Corrections.

So for example client ALB378273 will show blank as we still have one topic waiting for corrections, but client ARE379242 is all good to go and will need to show the latest date which is March 12th.

 

Hope this explained a little bit more what I need to do and that you can show me some light here

Regards,

Agustina

1 ACCEPTED SOLUTION

Hey @Agustina ,

 

try the following measure:

LastDate =
IF(
    CALCULATE(
        COUNTROWS( '2021 Online Q' ),
        '2021 Online Q'[ResponseCaseStatus] = "Waiting for Corrections"
    ) > 0,
    BLANK(),
    CALCULATE( MAX( '2021 Online Q'[LastModified] ) )
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

View solution in original post

3 REPLIES 3
selimovd
Super User
Super User

Hello @Agustina ,

 

I didn't understand the issue with the "status 'Waiting for Corrections'". Maybe you can explain that again?

Except for that you can add a new calculated column to the table '2021 Cases':

LastDate = CALCULATE( MAX( '2021 Online Q'[LastModified] ) )

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Hi @selimovd I've just updated the original post with more information to explain it better 🙂 thank you!

Hey @Agustina ,

 

try the following measure:

LastDate =
IF(
    CALCULATE(
        COUNTROWS( '2021 Online Q' ),
        '2021 Online Q'[ResponseCaseStatus] = "Waiting for Corrections"
    ) > 0,
    BLANK(),
    CALCULATE( MAX( '2021 Online Q'[LastModified] ) )
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.