Forum Discussion
Show values on table based on columns from another table
- 9 months ago
This is an efficient solution and works when you can only choose 1 date. If there is a need to select multiple dates then try:
Parts Planned =
CALCULATE(
SUM('TableB'[Parts Planned]),
TREATAS(
VALUES('TableA'[Date]),
'TableB'[Date]
),
TREATAS(
VALUES('TableA'[part number]),
'TableB'[part number]
)
)
Hi limonSerga,
I tested here and worked. Please try from your side and let me know if it worked.
Parts Planned =
LOOKUPVALUE(
TableB[Parts Planned],
TableB[Date], SELECTEDVALUE(TableA[Date]),
TableB[part number], SELECTEDVALUE(TableA[part number])
)
If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
This is an efficient solution and works when you can only choose 1 date. If there is a need to select multiple dates then try:
Parts Planned =
CALCULATE(
SUM('TableB'[Parts Planned]),
TREATAS(
VALUES('TableA'[Date]),
'TableB'[Date]
),
TREATAS(
VALUES('TableA'[part number]),
'TableB'[part number]
)
)
- limonSerga9 months agoRegular Visitor
Smitho
Thanks a lot for the support. I was able to make it work in my model!