Forum Discussion
kwhite0510
3 years agoFrequent Visitor
Count formula based on single criteria in same table
Good Afternoon, I have a dataset that has sales agreements listed. Currently if the agreement has mulitple products listed, it will repete the total quantity (ie. duplicating it). I need a count ...
Wilson_
Memorable Member
3 years agoHello kwhite0510,
Try the below as a measure, instead of your two step process. What the measure does is summarize the table first to eliminate the duplicate rows.
Total Agreement Quantity =
VAR AgreementSummaryTable =
SUMMARIZE (
'Agreements',
'Agreements'[Agreement Number], 'Agreements'[Total Quantity]
)
RETURN
SUMX (
AgreementSummaryTable,
'Agreements'[Total Quantity]
)
It should work in a visual that has Agreement Number in the rows. If that doesn't work for you, please share a snippet of your agreement table and a sample report page you'd be using this calculation on.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)