Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Need yes or no based on two different columns

Hi,

I'm having a table with thousands of entries.By default I'm having ID, Item, Identity columns. If any one item has identity yes then all the item which belongs to that  perticular ID must have result yes and all the items has no then the result for that perticular id must be no. So, there are few Id's with only sigle items and others with multiple items. So, I need a fuction or DAX Code to get the output in Result column. Sample table is provided below. 

 

Please help me.

 

Thanks

IDITEMIdentityResult
abcd1noyes
abcd2yesyes
abcd3noyes
acb1nono
acb2nono
aec1nono
ahg3yesyes
  • Result Column =
    IF("yes" IN SELECTCOLUMNS(FILTER('Table',[ID] = EARLIER([ID])),"Result",[Result]),"yes","no")

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion
    Result Column =
    IF("yes" IN SELECTCOLUMNS(FILTER('Table',[ID] = EARLIER([ID])),"Result",[Result]),"yes","no")
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your solution!!!!