Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Using group by function in dax

Hi,   I have the below table In which Final Value is my output column It is supposed to be calculated such that if Case 1: For Each Anchor Config and Target Config Combination, If Compare value h...
  • v-lionel-msft's avatar
    6 years ago

    Hi Anonymous ,

    Here’s my DAX, which is a column:

    F_value = 
    VAR x =
    FILTER(
        Sheet4,
        [Anchor Config] = EARLIER([Anchor Config]) &&  [Target Config] = EARLIER([Target Config])
    )
    VAR y =
    CONTAINS(
        x,
        [Compare Value],
        "Yes"
    )
    RETURN
    IF(
        y = TRUE(),
        "Yes",
        "NO")

    And here’s my test result:

     

    Best regards,
    Lionel Chen

     

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