Forum Discussion
Vlookup
- 3 years ago
Thats fantastic. Thanks a lot for this formula. Much appreciated.
What if instead of "if there are multiple different values in column 5 for the same part number, this will include them all in a comma separated list" , if any row have "YES" in column 5 then answer should be "YES". Is this something we can add in this DAX formula please?
Perfect and much appreciated again.
Sorry one last question. Similar topic.
What if i need to add similar formula for below logic please.
1. New DAX formula in the table 4.
2. Where column 1 and Column 3 will have part numbers sometimes repeated partnumbers in both columns
3. column 5 is the desired solution. If column 1 part number or column 3 part number have "Yes" in column 5 then for the same part numbers in both column 1 and column 3 it should be "YES" please.
Sorry and any help will be massive push for my BI
Thanks a lot
If I understand you correctly you want to apply the same base logic as previously but only when column 1 and column 3 have the same part number ? You can try
new column =
IF (
'table 1'[column1] = 'table 1'[column3],
VAR PartNumber = 'table 1'[column1]
RETURN
IF (
"YES"
IN CALCULATETABLE (
VALUES ( 'table 2'[column 5] ),
TREATAS ( { PartNumber }, 'table 2'[part number] )
),
"YES",
"NO"
),
"NO"
)
- jimpatel3 years agoPost Patron
Sorry for my poor explanation.
Actually no.
Example:
I have table 4. In table 4 i have multiple columns and in column 1 having part numbers and column 3 have sub part numbers. In some cases, column1 part number might be repeating in column 3 and vice versa.
What i am after is, if column 5 is "Yes" for either column 1 partnumber or column 3 part number, then it should be "YES" for all similar partnumbers. I hope this will help. This will help to remove the barrier what i am having.
Thanks again
- johnt753 years agoSuper User
I think this might do it
col 5 has yes = VAR PartNumbers = { 'table 4'[column 1], 'table 4'[column 3] } RETURN IF ( "YES" IN CALCULATETABLE ( VALUES ( 'table 2'[column 5] ), TREATAS ( PartNumbers, 'table 2'[part number] ) ), "YES", "NO" )- jimpatel3 years agoPost Patron
Sorry i think this will explain bit clear
Sorry again