Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I'm trying to get a list of products that were sold to a single customer. I can easily attain an accurate list of products with a COUNT function by Customer that is filtered to "1". However, once I bring in customer detail, the list blows up. Any advice?
Solved! Go to Solution.
This link solved my problem:
The function I used:
CUSTOMER_COUNT_BY_PRODUCT = CALCULATE(DISTINCTCOUNT(VIEW_SALES[CUSTOMER_CODE_SOLD]), ALLEXCEPT(VIEW_SALES, VIEW_SALES[MFC_PRODUCT_CODE],VIEW_SALES[TRANSACTION_DATE]))
Adding in the Customer changes the context. The table now shows a count of products where a customer has bought one (per customer).
This is how measures work, they adapt to the context in which they are evaluated.
You have options: re-write the measure to alter the context back to the original
or (depending on your model) put the customer in a separate visualisation (rather than add it to the table) and click the rows of the table.
Post your pbix here if you want someone to look at it
This link solved my problem:
The function I used:
CUSTOMER_COUNT_BY_PRODUCT = CALCULATE(DISTINCTCOUNT(VIEW_SALES[CUSTOMER_CODE_SOLD]), ALLEXCEPT(VIEW_SALES, VIEW_SALES[MFC_PRODUCT_CODE],VIEW_SALES[TRANSACTION_DATE]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |