Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Replace value

Hello all, I have some trouble finding the solution to the following problem:

 

I want to replace the value of (row x, column x) with the value of (row n, column n), where the value of (row x, column x) and row n match. To make this problem more clear, see the following tables:

 

IssueEpic LinkEpic Name
AA-XXX1 "Name Epic 1"
AA-XXX2AA-XXX1 
AA-XXX3AA-XXX1 
AA-XXX4  
AA-XXX5AA-XXX1 
AA-XXX6 "Name Epic 2"
AA-XXX7AA-XXX6 

 

I would like to replace the Epic Link value with the matching Epic Name value, resulting in:

 

IssueEpic LinkEpic Name
AA-XXX1 "Name Epic 1"
AA-XXX2AA-XXX1"Name Epic 1"
AA-XXX3AA-XXX1"Name Epic 1"
AA-XXX4  
AA-XXX5AA-XXX1"Name Epic 1"
AA-XXX6 "Name Epic 2"
AA-XXX7AA-XXX6"Name Epic 2"

 

Hopefully someone knows how to solve this, thank you in advance 🙂 

  • You can add a DAX column with this expression to get your result.

     

    EpicName2 =
    VAR thisepiclink = Issues[Epic Link]
    VAR result =
        MINX ( FILTER ( Issues, Issues[Issue] = thisepiclink ), Issues[Epic Name] )
    RETURN
        IF ( Issues[Epic Link] = "", Issues[Epic Name], result )

     

    Pat

     

2 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    You can add a DAX column with this expression to get your result.

     

    EpicName2 =
    VAR thisepiclink = Issues[Epic Link]
    VAR result =
        MINX ( FILTER ( Issues, Issues[Issue] = thisepiclink ), Issues[Epic Name] )
    RETURN
        IF ( Issues[Epic Link] = "", Issues[Epic Name], result )

     

    Pat

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Pat, that did the job!