Forum Discussion
Copy text from within table
- Anonymous3 years ago
Hi deisterBI ,
If you want to add a new column, you also just need to adjust my measure simply, please try below dax formula:
Article Column = VAR cur_monarticle = 'Table'[Mother article] VAR tmp = FILTER ( ALL ( 'Table' ), 'Table'[Mother article] = cur_monarticle ) VAR max_sale = MAXX ( tmp, [Sales] ) VAR article = CALCULATE ( MAX ( 'Table'[Doughter article] ), FILTER ( ALL ( 'Table' ), 'Table'[Sales] = max_sale ) ) RETURN articlePlease refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi deisterBI ,
If you want to add a new column, you also just need to adjust my measure simply, please try below dax formula:
Article Column =
VAR cur_monarticle = 'Table'[Mother article]
VAR tmp =
FILTER ( ALL ( 'Table' ), 'Table'[Mother article] = cur_monarticle )
VAR max_sale =
MAXX ( tmp, [Sales] )
VAR article =
CALCULATE (
MAX ( 'Table'[Doughter article] ),
FILTER ( ALL ( 'Table' ), 'Table'[Sales] = max_sale )
)
RETURN
article
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Now that i ran some tests, i came across a problem:
when another daughter article in another part list, has the same sales as the maximum one in another part list, those get switched up at times.
The only link between both datasets seems to be the qty in sales.
I thought that the variables you defined, prefented that exact result, but apparently it is possible that the formula only matches the daughter article number based on the max sales and somehow is ignoring the mother article parameter.
i am super lost here, if you can help once again , that would be great 🙂