Forum Discussion
alvin199
2 years agoHelper III
Question on Extract Group Values
Hi all, I have a sample dataset that has 3 columns, ID, Food-A and Food-B. I would like to create a new column called Last Meal (Yellow color). I would like to exact the group of value by Sample ...
- 2 years ago
pls try this
Column = if(maxx(FILTER('Table','Table'[Sample]=EARLIER('Table'[Sample])&&'Table'[A]<>"NA"),'Table'[A])="",'Table'[B],'Table'[A])pls see the attachment below
ryan_mayu
2 years agoSuper User
do not think too much about max, if you change to min, the DAX will be still working. you can separate the DAX to see the output of each part.
check the output of
maxx(FILTER('Table','Table'[Sample]=EARLIER('Table'[Sample])&&'Table'[A]<>"NA")Anonymous
2 years agoNot applicable
ryan_mayu I tried to change the virtual table to NA and it will use to evaluate the the Food-A column is empty (using the Test5 column). However, why A3 is giving NA despite A3 row will appear in the virtual table and it also become True when being used to evaluate Food-A column is empty, thus it shoud display Food-B column value, choco.
- ryan_mayu2 years agoSuper User
my dax is <>"NA"
Column = if(maxx(FILTER('Table','Table'[Sample]=EARLIER('Table'[Sample])&&'Table'[A]<>"NA"),'Table'[A])="",'Table'[B],'Table'[A])