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
jja
Helper III
Helper III

Get related record info in same table

Hi

I have this tructure in my table
new_transactions

What user do they inspect some work done in this case it is recorded in G column as "suvirinimo patikra" and insoect stage in column U is recorded as suvirinimas where this component was made as "suvirinimas"(column G) by Darbuotojo nuoroda(Column) - 030.

As inpector recorder this suvirinimo patikra as failed(column S) want in my powerbi report to return this Darbuotojo nuoroda 030 aside this failed suvirinimo patikra record.

Can you help me to write this DAX query either as a measure or as a new column?

1 ACCEPTED SOLUTION

Hi @jja ,

 

Try below:

FailedSuvirinimoPatikraEmployee = 
VAR InspectionStage = 'new_transactions'[Inspect stage]
VAR DarboTipoNuoroda = 'new_transactions'[Darbo tipo nuoroda]
RETURN
    IF(
         DarboTipoNuoroda = "suvirinimas" && InspectionStage <> "suvirinimas" &&  'new_transactions'[Inspect type] <> "failed",
        'new_transactions'[Darbuotojo nuoroda],
        BLANK()
    )

vkongfanfmsft_0-1715757110778.png

 

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-kongfanf-msft
Community Support
Community Support

Hi @jja ,

 

Maybe you can try formula like below to create calculated column:

FailedSuvirinimoPatikraEmployee = 
VAR InspectionStage = 'new_transactions'[Inspect stage]
VAR DarboTipoNuoroda = 'new_transactions'[Darbo tipo nuoroda]
RETURN
    IF(
        InspectionStage = "suvirinimas" && DarboTipoNuoroda = "suvirinimo patikra" && 'new_transactions'[Inspect type] = "failed",
        'new_transactions'[Darbuotojo nuoroda],
        BLANK()
    )

vkongfanfmsft_0-1715738134753.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-kongfanf-msft 
In this case i want to return not that Employee who made "suvirinimo patikra" but emploee who made suvirinimas and the inspecting emploee found it failed. So in this case regarding data i sent it should return 030. Maybe it is easier to add some calculated column and in the original record add that it failed. Like i have failed inspection and then i need to find the original record and put there failed also?

Hi @jja ,

 

Try below:

FailedSuvirinimoPatikraEmployee = 
VAR InspectionStage = 'new_transactions'[Inspect stage]
VAR DarboTipoNuoroda = 'new_transactions'[Darbo tipo nuoroda]
RETURN
    IF(
         DarboTipoNuoroda = "suvirinimas" && InspectionStage <> "suvirinimas" &&  'new_transactions'[Inspect type] <> "failed",
        'new_transactions'[Darbuotojo nuoroda],
        BLANK()
    )

vkongfanfmsft_0-1715757110778.png

 

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.