Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I need to get the distinct count of products in a matrix by customer. I want it to count the # of products sold that have sales for each customer. The measure counts the products as 1 on the product level of the matrix, but it always shows 59 at the customer and segment levels (59 is the total count of all products). In the below example it should show 2.
My Matrix is set up :
Count | |
Segment | 59 |
Customer | 59 |
Product | 1 |
Product | 1 |
Solved! Go to Solution.
Does this work more like you expect?
CALCULATE (
DISTINCTCOUNT ( 'Product Class'[Major Planning Group Name] ),
Sales
)
Does this work more like you expect?
CALCULATE (
DISTINCTCOUNT ( 'Product Class'[Major Planning Group Name] ),
Sales
)
Hi @astano05 ,
What does Sales refer to in your initial formular? Is this a measure or a column?
Maybe try it with this:
Count = CALCULATE ( COUNTROWS ( 'Product Class' ), Table[Sales] <> BLANK() )
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @astano05 ,
I'll give it a shot. Would it work with this?
Count = CALCULATE ( COUNTROWS ( 'Product Class' ), NOT ( ISBLANK ( Table[Sales] ) )
Let me know, if that helped 🙂 Otherwise feel free to share some data!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
thanks for the reply! i get this error with this formula with calcluate.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
69 | |
66 | |
51 | |
33 |
User | Count |
---|---|
114 | |
97 | |
75 | |
65 | |
39 |