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?
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
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 ago
Post Patron
Sorry i think this will explain bit clear
Sorry again
- johnt753 years ago
Super User
Judging by the entry for 44, you're looking for some sort of recursion, which DAX doesn't do. You could maybe look into building a path hierarchy, or in some other way restructuring the model so that you can directly access the values.
- jimpatel3 years ago
Post Patron
thats cool idea. I will try that. Thanks again for your help.