Forum Discussion
Anonymous
6 years agoNot applicable
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...
- 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 ResultBest regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
MartynRamsden
6 years agoSolution Sage
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.
Anonymous
6 years agoNot applicable
Thank you, your solutions works! Still weird why my solutions breaks on other custom columns ...