Forum Discussion

sanct's avatar
sanct
Frequent Visitor
7 years ago
Solved

Replace Values in Row with Values from another specific cell

Hi All,   I'm trying to replace the values in one cell with the values from another specific cell. I'll start with the data model I'm using:   In a nushell, I have the results of an extensive sur...
  • TeigeGao's avatar
    TeigeGao
    7 years ago

    Hi sanct ,

    Please refer to the following DAX query:

    CalculatedCategory =
    CALCULATE (
        MIN ( Table1[Value] ),
        FILTER (
            ALL ( Table1 ),
            Table1[ResponseID] = EARLIER ( Table1[ResponseID] )
                && (
                    Table1[Category] = EARLIER ( Table1[Category] )
                        || RIGHT ( Table1[Category], 1 ) = RIGHT ( EARLIER ( Table1[Category] ), 1 )
                )
                && Table1[Value] <> BLANK ()
                && Table1[Value] <> "Yes"
        )
    )

    The result will like below:

    Best Regards,

    Teige