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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
dodiyal
Frequent Visitor

The graph is not taking values from different files although relationship is created between file

Dear Team, I am having one issue in the power bi dashboard.

i have 2 files from which i wish to take the values and 3rd file is the relationsip between the first to file to connect the relationship.

But when i add the values in graph only 1 file values are showing and 2nd file value is not adding. can you help.

The file is like this.

Table 3  (the relationship file)

Product name

cycle

motorcycle

 

 

table 1

Product name   Purchased  Qty

cycle                     Yes             1

Motorcycle           No              1

 

Table 2

Product name    Purchased     Qty

motorcycle            yes             1

cycle                      No              1

 

so like this table 3 is the relationship file which connect both tables but when i add matrix graph like in row product name and in column purchased and value Qty then only either table 1 shows correctly or table 2 shows correctly but both are not showing at once.

Can you help

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @dodiyal ,

 

We can use union function to append two tables as a fact table to meet your requirement:

 

1.jpg2.jpg

 

Or we can create a dim table if you have more than two purchased record:

 

PurchasedDim = Distinct(Union(Distinct('table 1'[Purchased]),Distinct('Table 2'[Purchased])))


By the way, PBIX file as attached.


Best regards,

 

Community Support Team _ Dong Li
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

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi  @dodiyal ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @dodiyal ,

 

We can use union function to append two tables as a fact table to meet your requirement:

 

1.jpg2.jpg

 

Or we can create a dim table if you have more than two purchased record:

 

PurchasedDim = Distinct(Union(Distinct('table 1'[Purchased]),Distinct('Table 2'[Purchased])))


By the way, PBIX file as attached.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
parry2k
Super User
Super User

@dodiyal can you make sure in Matrix , you are product name from table 3 and then it should work. And I assume you have one to many relationship from Table 3 to Table 1 and Table 2 with cross filter direction to single.

 

Ask anything Power BI. Book appointment for a free consultancy at https://www.perytus.com Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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