Forum Discussion
How to select data from another table with a single slicer
- 3 years ago
Hi ddimitrov ,
According to your description, here's my solution. Create two measures.
MdaysTarget = IF ( ISFILTERED ( Actuals[Program] ), SUMX ( FILTER ( ALL ( 'Targets' ), 'Targets'[Quarter] = SELECTEDVALUE ( Actuals[Quarter] ) && 'Targets'[Program] = SELECTEDVALUE ( 'Actuals'[Program] ) ), 'Targets'[Mdays] ), IF ( ISFILTERED ( 'Actuals'[Quarter] ), SUMX ( FILTER ( ALL ( 'Targets' ), 'Targets'[Quarter] = SELECTEDVALUE ( Actuals[Quarter] ) ), 'Targets'[Mdays] ), SUM ( 'Targets'[Mdays] ) ) )Difference = 'Actuals'[MdaysTarget] - SUM ( 'Actuals'[ Mdays] )Get the result.
I attach the file below for your reference.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best regards,
Community Support Team_yanjiang
ddimitrov , I such cases, it always advisable to have common dimension tables
Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda
Power BI- Power Query: When I asked you to create common tables: https://youtu.be/PqfGW6pl1Sw
Thanks for the advice, Amit.
I will test it in coming days and will share feedback.