Forum Discussion
Anonymous
8 years agoNot applicable
When any row in a column equals True, return True
Hi there, I have a database with a unique user ID, a customer ID and a column showing the user is active. User ID Customer ID User is Active 1 1 FALSE 2 1 FALSE 3 2 FALSE ...
- 8 years ago
Could you please add a new column in "Data" pane as below:
CustomerActive = VAR _TrueVal = SELECTCOLUMNS(FILTER(ALL(UserCustomer),UserCustomer[UserActive]="True" && UserCustomer[CustomerID] = EARLIER([CustomerID])),"UserActive",UserCustomer[UserActive]) RETURN IF(ISBLANK(_TrueVal),"FALSE",_TrueVal)
Here is the expected output as per the sample data provided...
Output
Anonymous
8 years agoNot applicable
I had to change "true" to true() because its a boolean columnBut when doing that I get this 'expressions that yield variant data-type cannot be used to define calculated columns
v-cherch-msft
Microsoft Employee
8 years agoHi Anonymous
You may try to change the data type to 'Text' for column 'UserActive'.
Regards,
Cherie
- Anonymous8 years agoNot applicable
That did the trick! Thanks so much for helping out!