The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
For each month I'm calculating the DISTINCT COUNT of articles and I have this result below :
When I'm calculating the sum of the results for all months I have 2388. It's different from the sum displayed by the matrix visual 2280 :
The problem is some articles existed in different months...
How to calculte the sum for each month without counting the same articles for different months ?
Thanks in advance.
Regards.
Hi, @K-LED,
If I understand you correctly, you want to make sure an article is not counted in two different months. How to do this will depend on what your data look like.
Assuming your data has an orderID, your measure could look like this:
Measure = COUNTROWS ( FILTER ( ADDCOLUMNS ( SUMMARIZE ( 'Table'; 'Table'[OrderID]; 'Table'[ArticleID] ); "minDate"; CALCULATE ( MIN ( 'Table'[Date] ); ALL ( 'Table'[Month] ) ) ); [minDate] = CALCULATE ( MIN ( 'Table'[Date] ) ) ) )
Cheers,
Sturla
User | Count |
---|---|
12 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |