The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |