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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Scala
Regular Visitor

Using aggregate (sum) in visuals is removing rows

Hello everyone! I've run into some behaviour in PowerBI I don't quite understand, which makes it difficult to figure out how to work around it. I have a table that has some master data for materials. Material number is unique in this table. Data looks something like:

 

Material numberName
AB1Product1
CD2Product2
EF3Product3

 

This table has a relation with a stock table.

 

Material numberAmountLocation
AB11A
AB12B
CD23A

 

Relation is 1 to n, with crossfilter direction single. There are no other tables related to either of these two tables.

 

Now I'd like to combine the Material number and Name from the material table, with the sum of the available stock from the stock table. What I'd want is a table visual that contains:

Material numberNameSum amount
AB1Product1   3
CD2Product2   3
EF3Product3

 

 

What seems to be happening is the material numbers with no records in the stock table are no longer shown in the visual:

Material numberNameSum amount
AB1Product1  3
CD2Product2

  3

 

How can I create a table visual that also shows the materials without stock? 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Scala , Add +0 in your measure

 

sum(Table[Amount]) +0

 

 

or use the option in visual, show item with no data

 

Show item with No data new.pngShowItemwithoutdata.JPG

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Scala , Add +0 in your measure

 

sum(Table[Amount]) +0

 

 

or use the option in visual, show item with no data

 

Show item with No data new.pngShowItemwithoutdata.JPG

Thanks very much!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.