Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I need to show data into table A from table B based on Key made of Col A and Col B (ColA&ColB). This data into table A from table B is being mapped based on the Key irrespective of any date but need to show against Month column( whatever month is selected)
I am using below dax
Solved! Go to Solution.
Hi, @poojag820
You can try to create an inactive relationship between the two tables based on the Key field and activate it when it is used.
Sales by YearMonth =
VAR __tableAKey =
SELECTEDVALUE ( TableA[Key] )
VAR __result =
CALCULATE (
SUM ( TableB[Sales] ),
FILTER ( TableB, TableB[Key] = __tableAKey ),
RELATEDTABLE ( TableB )
)
RETURN
__result
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @poojag820 -you can adjust your DAX measure to work for both single and multiple month selections
Sales =
VAR _selectedKey = VALUES(tableA[Key])
VAR _salesSum =
CALCULATE(
SUM(tableB[Sales]),
FILTER(
ALL(TableB),
TableB[Key] IN _selectedKey &&
TableB[Month] IN VALUES(tableA[Month]) -- Match the Month context
)
)
RETURN
_salesSum
Hope this works.
Proud to be a Super User! | |
this condition will map values corresponding to Date also but I need to map values irrespective of date from table B into table A and show it in front of month of Table A.
I am mapping values with Key which does not have date in it.
Hi, @poojag820
You can try to create an inactive relationship between the two tables based on the Key field and activate it when it is used.
Sales by YearMonth =
VAR __tableAKey =
SELECTEDVALUE ( TableA[Key] )
VAR __result =
CALCULATE (
SUM ( TableB[Sales] ),
FILTER ( TableB, TableB[Key] = __tableAKey ),
RELATEDTABLE ( TableB )
)
RETURN
__result
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.