Forum Discussion
PS_78
Helper II
2 years agoSUMX with COUNT returns incorrect value
Hello All - I have issue with a measure created to calculate count using SUMX function. My requirement is to calculate count of document #'s where type = "TP1". But the measure I created returns inco...
- 2 years ago
In additional I also need to calculate distinct count for doc #, CC and Year combination.DC = COUNTROWS(summarize('Table',[CC],[Doc #],[Year]))
PS_78
Helper II
2 years agoHi lbendlin - Awesome. Thanks. But what is the issue with COUNT in SUMX? Also how can I get distinct count of rows for the combination of Doc #, Type and CC for the same document type?
Thanks,
lbendlin
Super User
2 years agoYou can use a table visual for that
When you use the count inside the SUMX you are multiplying each row's filtered count with each row's unfiltered count.
If you need to use SUMX, use
Msr_Count2 = SUMX(FILTER('Table', [Type] = "TP1"), 1)