Forum Discussion
hemann
Helper I
3 years agoDAX Count on condition duplicated
Hi,
I am trying to return serial number using DAX measure based on following condition, it appears in x2 or more sources.
Sample data
| Source | ||||
| Serial Number | A | B | C | Total |
| 1234 | 1 | 1 | 2 | |
| 1235 | 3 | 3 | ||
| 1236 | 1 | 1 | ||
| 1237 | 1 | 1 | ||
| 1238 | 3 | 2 | 5 | |
| 1239 | 1 | 1 | ||
| 1240 | 1 | 1 | ||
| 1241 | 1 | 1 |
Desired Result
| Serial Number | Result |
| 1234 | 2 |
| 1238 | 5 |
Can somebody please help with this.
Hi,
Try these measures
Values = SUM(Data[Value])Count = COUNTROWS(Data)Measure = SUMX(FILTER(VALUES(Data[Source]),CALCULATE([Count],all(Data[Source]))>=2),[Values])Hope this helps.
4 Replies
- AnonymousNot applicable
Hi hemann,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
- Ashish_Mathur
Super User
Hi,
Try these measures
Values = SUM(Data[Value])Count = COUNTROWS(Data)Measure = SUMX(FILTER(VALUES(Data[Source]),CALCULATE([Count],all(Data[Source]))>=2),[Values])Hope this helps.
- hemann
Helper I
Yes this worked - thanks for your help with it!!