Forum Discussion
non-strict filtering
Anonymous , Try a measure like
measure =
var _prd = allselected(Product[product])
return
concatenatex(filetr(all(productcolor]) , productcolor[product] in _prd),productcolor[color])
- Anonymous5 years agoNot applicable
Thank you. I finally made it work, but I am still facing an issue.
I seems that the filter from product_color does not propagate onto the product table.The measure looks like this:
Available Colors =
VAR AffectedProducts = SELECTCOLUMNS(ALLSELECTED('product_color'), "aff_prod_ids", [product_id])RETURN
CONCATENATEX(FILTER(ALL(product_color), product_color[product_id] IN AffectedProducts), product_color[color], "; ")
The way I understand the measure works is this:- product_color has two columns: "product_id" and "color";
- I fiter "color" thru a slicer;
- I get the "product_id"s affected by that filtering:
SELECTCOLUMNS(ALLSELECTED('product_color'), "aff_prod_ids", [product_id])
- then I cancel all the filters on product_color table and get all the product_color records for the product_ids from above:
FILTER(ALL(product_color), product_color[product_id] IN AffectedProducts)
But when I put the result of the concatenation onto the table visual, PBI does not see any connection between the product table and the measure. The measure returns the concatenated colors, but does not differentiate between the productsThis picture is just an example of what I get. Even though I have only the "car" product in green, I get "phone" returned with all the car's colors, too. Any ideas why this is happening, please?