Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 Ordered | Total Product Quantity |
A | Apple | 2 | 12 |
B | Apple | 12 | |
C | Apple | 10 | 12 |
B | Orange | 7 | 15 |
C | Apple | 12 | |
C | Orange | 8 | 15 |
I used a different configuration in the filter which got me the expected result. thanks
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
User | Count |
---|---|
17 | |
14 | |
14 | |
13 | |
12 |
User | Count |
---|---|
19 | |
15 | |
15 | |
11 | |
10 |