Forum Discussion
Loic_Pedro_Hans
2 years agoRegular Visitor
Formula for identify if a code client is in a table
I create a new table with unique value (By SUMMMARIZE)
I try to add a column that the value is 1 if [CLG_CODE] is in PTE[CLG_CODE], and 0 if is not present
but there is an error (in red in the formula)
Thank for your help.
My_SMS =
ADDCOLUMNS(
SUMMARIZE(
SMS,
SMS[AGC_LIBC],
SMS[CLG_CODE],
SMS[CAT_LIBC],
SMS[Type]
),
"Code Client", SMS[CLG_CODE],
"PTE", IF (
CALCULATE(
COUNTROWS(PTE),
PTE[CLG_CODE] = [Code Client]
) > 0, 1, 0
)
)
1 Reply
- lbendlinSuper User
You cannot reference a field in the same step where you define it. Wrap your ADDCOLUMNS in another ADDCOLUMNS.
Why not use [CLG_CODE] directly?