Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to get data from another table?

The green card in the pbix file and the slicer, are from different tables. That's why when I changed the "Purpose" slicer, the data in the card won't change.

 

I cannot change the relationship model because I have so many other tables, and it is quite complicated. Is there any DAX to make the data change when I choose the "Purpose" slicer?

I have tried to create this column in COST Table but it won't work. Plan_lookup = LOOKUPVALUE(plan[Count Plan],plan[YEAR],cost[YEAR], plan[Purpose], cost[PURPOSE])

This is supposed to be the output.Capture.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@Anonymous 

According to the sample you've provided,if you are willing to make some adjustments to the model, that would be great.

 

You can try to create two new tables, such as the following: 

PURPOSE = DISTINCT(UNION(VALUES(dms[PURPOSE]),VALUES(plan[Purpose])))

 

v-caitlyn-mstf_0-1608269544345.png

 

 

Year = DISTINCT(UNION(VALUES(dms[YEAR]),VALUES(plan[YEAR])))

 

v-caitlyn-mstf_1-1608269544349.png

 

 

Then you can create relationships between these tables

v-caitlyn-mstf_2-1608269544360.png

 

 

When you back to the report viewyou will see

 

Sample1.gif

 

Here is the demo , please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/linli_qiuyunus_onmicrosoft_com/EWcBbXmQy-dFslys35haO00BEs5gEmTZNDdzmxNloSg-gg?e=04C4T4

 

For a better way to optimize your existing model, we recommend using the star schema. https://docs.microsoft.com/en-us/power-bi/guidance/star-schema

It describes star schema design and its relevance to developing Power BI data models optimized for performance and usability.

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi,@Anonymous 

According to the sample you've provided,if you are willing to make some adjustments to the model, that would be great.

 

You can try to create two new tables, such as the following: 

PURPOSE = DISTINCT(UNION(VALUES(dms[PURPOSE]),VALUES(plan[Purpose])))

 

v-caitlyn-mstf_0-1608269544345.png

 

 

Year = DISTINCT(UNION(VALUES(dms[YEAR]),VALUES(plan[YEAR])))

 

v-caitlyn-mstf_1-1608269544349.png

 

 

Then you can create relationships between these tables

v-caitlyn-mstf_2-1608269544360.png

 

 

When you back to the report viewyou will see

 

Sample1.gif

 

Here is the demo , please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/linli_qiuyunus_onmicrosoft_com/EWcBbXmQy-dFslys35haO00BEs5gEmTZNDdzmxNloSg-gg?e=04C4T4

 

For a better way to optimize your existing model, we recommend using the star schema. https://docs.microsoft.com/en-us/power-bi/guidance/star-schema

It describes star schema design and its relevance to developing Power BI data models optimized for performance and usability.

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , please find the various ways to copy data from one table to another. Please see if my video can help

https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.