Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Custom Column, weird behaviour

Hi, while adding some custom columns to a table (DAX) I encountered something weird, and I don't understand why it's happening: I have a table: ID Value 1 False 1 True 1 False 1...
  • MartynRamsden's avatar
    6 years ago

    Hi Anonymous 

     

    Not entirely sure why it's happening but try this expression for your first calculated column:

    isTrueID =
    VAR SelID = Test[ID]
    VAR TrueRows =
    COUNTROWS(
        FILTER(
            ALL( Test ),
            Test[ID] = SelID
                && Test[Value] = TRUE()
        )
    )
    VAR Result =
        IF(
            TrueRows = 0,
            FALSE(),
            TRUE()
        )
    RETURN
        Result

     

    Best regards,
    Martyn


    If I answered your question, please help others by accepting it as a solution.