Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I need to produce a Measure which will count the number of products bought per customer from the beginning of the year to a given date. I can do this no problem but the measure also gives the total as the distinct count overall whereas I would like it to give a total by adding up each line (if that makes sense). I need this to be able to have a base figure of how many products are used by each customer overall.
I am using the following at the moment:
I would like the total to be 54 for obvious reasons.
Any help would be much appreciated
Solved! Go to Solution.
please try
Products Ordered part 1 =
SUMX (
VALUES ( orders[Clinet ID] ),
CALCULATE (
DISTINCTCOUNT ( Orders[Article Number] ),
DATESBETWEEN ( Dates[FullDate], DATE ( 2023, 01, 01 ), DATE ( 2023, 08, 31 ) )
)
)
please try
Products Ordered part 1 =
SUMX (
VALUES ( orders[Clinet ID] ),
CALCULATE (
DISTINCTCOUNT ( Orders[Article Number] ),
DATESBETWEEN ( Dates[FullDate], DATE ( 2023, 01, 01 ), DATE ( 2023, 08, 31 ) )
)
)
Hi tamerj1, Thanks for the advice, certainly an improvement although one of the customers is now showing as blank, any idea why this may be?:
You are absolutely right! Thank you so much, I'm still not sure I understand the theory on how it works but it does!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |