Forum Discussion
aris
4 years agoFrequent Visitor
Filter per category
Hi ! I have 2 tables, Table A shows part number applicability , Table B shows stock levels. I want to create a report that shows P/N and q-ty per selected AC type. I tried (snip below) but i get P/...
- 4 years ago
Have updated the demo file. The quanity measure needed to read the p/n currently needed...
Quantity = CALCULATE( SUM ( Stock[Qty] ), TREATAS( VALUES(Applicability[P/N]), Stock[P/N] ) )Could have made relationship bidirectional but this is safer.
bcdobbs
4 years agoCommunity Champion
Actually I think I'm doing it the opposite way round to what you want! Will update.
bcdobbs
4 years agoCommunity Champion
Have updated the demo file. The quanity measure needed to read the p/n currently needed...
Quantity =
CALCULATE(
SUM ( Stock[Qty] ),
TREATAS( VALUES(Applicability[P/N]), Stock[P/N] )
)
Could have made relationship bidirectional but this is safer.
- aris4 years agoFrequent Visitor
PERFECT!!! thank you so much bcdobbs! you are genious 🙂
- bcdobbs4 years agoCommunity Champion
Enjoyed it! Looked simple to start with but there are some subtle requirements! Thanks.
- bcdobbs4 years agoCommunity Champion
Pondering on your data model.
I think it's a legitimate use case of a bidirectional relationship. Especially if you only have those two tables. Would remove the need for the TREATAS.