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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jj-alex
Frequent Visitor

How to show total of each product and product wise order quantity per customer

Hello,

I am working with the Northwind database where it has separate tables for Customer, Product and Order Detail. I need to show

the Total of each product along with Customer name, Product name, Quantity ordered. I created a measure for the Total product quantity and added it to the matrix, but then I see the Quantity ordered with blank. I dont want to see any customer in the visual where they have not ordered a particular product. For eg: in the table below, I dont want to see the 2nd and the 5th row as those customers have not ordered any of those products. Please advise how to establish using DAX.

 

Customer

Name

Product

Name

Quantity OrderedTotal Product Quantity
AApple212
BApple 12
CApple1012
BOrange715
CApple 12
COrange815
2 REPLIES 2
jj-alex
Frequent Visitor

I used a different configuration in the filter which got me the expected result. thanks

jiaopengzi
Frequent Visitor

 

You need to add a judgment, roughly as follows. Please modify it according to your model information.

 

Total Product Quantity =
VAR qo = Quantity Ordered
VAR result = IF(qo = Blank(),Blank(),SUM(Quantity Ordered))
RETURN
result

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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