Forum Discussion

BigBadBob's avatar
BigBadBob
Icon for Helper I rankHelper I
6 years ago
Solved

Dax Measure

Hi,   I know im being stupid but this is driving me crazy.    Based on the below data i would like to retrieve all lines where one of the lines has "Flag" = 1. I have included what the results sh...
  • AlB's avatar
    6 years ago

    Hi BigBadBob 

    Create a calculated column that will say whether the row is to be shown:

    ShowLine = 
    VAR res_ = CALCULATE(SUM(Table1[Flag]);ALLEXCEPT(Table1;Table1[ID]))
    RETURN
    IF ( res_ > 0; "YES"; "NO")

    Then place all the fields you want to show in a  Table visual and filter for ShowLine = "YES"

    It can also be done with a measure for the filtering, instead of a calculated column

    Please mark the question solved when done and consider giving kudos if posts are helpful.

     Cheers 

     

     

     

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi BigBadBob ,

     

    Please share sample data for both the tables and the relationship between them.

     

     

    Regards,

    Harsh Nathani