Forum Discussion
dfricker
6 years agoNew Member
Populate Conditional Column by Common ID
Hi All, I am new to Power BI, and I am stuck on the best way to solve an issue. The requirement is to populate multiple columns based multiple criteria from multi-rowed data. I was able to get th...
- Anonymous6 years ago
Hi,
Is it ok to have a calculated column instead of using Power Query (since this is in the DAX forum)? Perhaps this can work?
Success = VAR _rowId = 'Table'[ID] RETURN IF ( CONTAINS ( ALL ( 'Table' ); 'Table'[ID]; _rowId; 'Table'[Criteria 1]; "Meets" ) || CONTAINS ( ALL ( 'Table' ); 'Table'[ID]; _rowId; 'Table'[Criteria 2]; "Meets" ); "Yes"; "No" )Best Regards // Ulf
Anonymous
6 years agoNot applicable
Hi,
Is it ok to have a calculated column instead of using Power Query (since this is in the DAX forum)? Perhaps this can work?
Success =
VAR _rowId = 'Table'[ID]
RETURN
IF (
CONTAINS ( ALL ( 'Table' ); 'Table'[ID]; _rowId; 'Table'[Criteria 1]; "Meets" )
|| CONTAINS ( ALL ( 'Table' ); 'Table'[ID]; _rowId; 'Table'[Criteria 2]; "Meets" );
"Yes";
"No"
)
Best Regards // Ulf
- dfricker6 years agoNew Member
Yes, this is much cleaner than what I was doing. I could also use this to have the full logic in here. Thanks for the help!