Forum Discussion
Splitting Product name from component list
- 5 years ago
Anonymous
i have updated the DAX and this time I add more product in the sample data. pls see the attachment below
Anonymous
maybe you can use DAX to create a new table.
Table 2 =
VAR tbl=ADDCOLUMNS('Table',"product",maxx(FILTER('Table','Table'[key]<=EARLIER('Table'[key])&&'Table'[level]=0),'Table'[Object Description]))
return FILTER(tbl,'Table'[Item No]<>0)
pls see the attachment below
ryan_mayu Thank you for this, your attachement seems to produce 'product 1' for all rows when rows 11-21 (key) should be product 2, is there a way to do this? Also some of the real product names don't have anything in common in their name so referencing to "Product" wont work, is there a way to reference Level or item number to 0?
Thanks for your help so far!
- ryan_mayu5 years ago
Super User
Anonymous
sry, there is sth wrong in the previous DAX. I have fixed it.
pls see the attachment below.
- Anonymous5 years agoNot applicable
Hi ryan_mayu,
Thanks, this works but only for the first 5 products or so, then it just repeats out the 5th product for the rest of the 'product' column. However, I changed the product names from their actual ones to a more simpler 'product 1,2,3' etc and this works. Do you know why it doesn't work for the actual product names? I've a feeling its the maxx function.
Thanks- ryan_mayu5 years ago
Super User
Anonymous
i have updated the DAX and this time I add more product in the sample data. pls see the attachment below