Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have following table:
I want to show only those brands with more than 2 distinct articles and sum the value for those.
Here is my approach:
Z_DistCount = CALCULATE(SUM(Table1[Sales]); FILTER(Table1;DISTINCTCOUNT(Table1[Articles])>2))
Values look fine, but the total is messed up, expecting 485, instead of 699.
I suspect it has something to do with hasonevalue() , following
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
however, having trouble to adapt.
Alternatively,
Z_DistCount_sumx = SUMX(FILTER(Table1;DISTINCTCOUNT(Table1[Articles])>2);Table1[Sales])
has the same outcome as first formula above.
Any ideas?
Solved! Go to Solution.
hi @Anonymous
Just try this formula as below:
Measure =
CALCULATE(SUM(Table1[Sales]), FILTER(VALUES(Table1[Brand]),CALCULATE(DISTINCTCOUNT(Table1[Articles]))>2))
Result:
Regards,
Lin
hi @Anonymous
Just try this formula as below:
Measure =
CALCULATE(SUM(Table1[Sales]), FILTER(VALUES(Table1[Brand]),CALCULATE(DISTINCTCOUNT(Table1[Articles]))>2))
Result:
Regards,
Lin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |