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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Adding columns from related tables without filtering

Hi all,

I am trying to create a table visual which takes the stock of each sub assembly in a product, however, when I add the column for the next sub-assembly down, power BI removes the stock quantities for any assembly which doesn't have any more sub-assemblies. In this scenario, level 1 is the lowest sub assembly so whatever the highest level for a product, that will be the full assembly. 

For example: 

Level 1Level 1 stockLevel 2 Level 2 stock
A.1500A.2200
B.1300  

 

But this is how it is displayed:

Level 1 Level 1 StockLevel 2 Level 2 stock
A.1500A.2200
B.1   

 

Some of the things I have already tried include:

Show items with no data - This will remove the row with B.1 in it completely 

If I just enter the Level 2 stock column without Level 2 then it appears to work

I have tried adjusting the relationships in the model (making them filter one way and both) but this doesnt change anything

A lot of tweaking the data... with no luck

 

Each of the columns comes from a separate table due to how the data has been handed to me, 

attatched is a screenshot of the relevant part of the model.

 
 

PowerBI model help.pngThank you to anyone who is willing to give this a look.

 
 

 

 

 

10 REPLIES 10
Anonymous
Not applicable

I had the same problem and solved it by merging at the power query instead

Greg_Deckler
Super User
Super User

@Anonymous Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Anonymous , Can you share a bit bigger sample data and sample output in table format?

Anonymous
Not applicable

Here are some screenshots from Power Bi which should show what is happening 

Annotation 2020-08-17 140113.pngAnnotation 2020-08-17 140139.png

As you can see in the first line the number of 181 has been removed when it shouldnt be however the total remains the same

Hi @Anonymous,

 

The easiest way for one of use to answer your question is to have a sample copy of your data and the expected output, you can mock it all up in excel and share the file, share a link to the pbix or plop the data here in a table with a screen grab of how the data should look in the end. 

 

Thanks,

Richard



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Anonymous
Not applicable

This is how I want the data to look

PowerBI model help excel.png

I just dont understand why it is removing the values from the second column when I add the third one 

Hi @Anonymous,

 

More than likely has to do with the way your data is setup and the relationships in your model, really hard to guess without having the model and seeing exactly where the columns are being pulled from the measures used and the way the data is related



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Anonymous
Not applicable

I cant really post a file with any of the data on.

There are no measures being used here, it is just data from seperate tables

The model is connected in the picture that I put on the original post

 

Hi @Anonymous,

 

If you cannot share the real data then please create a file with fake data and the exact structure of your real data, if you are not using measures then this is an issue with your data model. Really hard for me to help without a representative sample of the model you are using, unfortuneatly the image does not provide me with enough info.

 

Richard



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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