Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Basically I want to count the number of distinct accounts that have sales greater than 0 for a quarter. The problem is that some accounts have negative sales for a quarter. Each account has multiple lines of data per quater for different transactions that have taken place. This is where I'm running into the issue. It is counting the lines that are positive as being greater than 0 and therefore getting added to my count total even though if you summed up ALL the lines for that quarter they would be less than 0. Example:
Account 1 - 1/1/2019 - $100
Account 1 - 1/3/2019 - -$200
So the total for this quater would be -$100 and therefore I don't want to count it but since one of the lines has positive revenue (the first line) it is counting it.
Also, I am filtering this measure that I have created by quarter in my dashboard so that it only shows the quarters that I want.
Current forumla I'm using (ignore the other critiera, the last part is what I am focusing on):
Solved! Go to Solution.
Hi @Wkeith ,
Assume that we have a table like below:
Then we can create a measure like below:
Measure =
VAR temptable =
SUMMARIZE (
Table1,
Table1[account],
Table1[date].[Quarter],
"Judge", SUM ( Table1[value] )
)
RETURN
CALCULATE ( COUNTROWS ( FILTER ( temptable, [Judge] > 0 ) ) )The result will like below:
Best Regards,
Teige
Hi @Wkeith ,
Assume that we have a table like below:
Then we can create a measure like below:
Measure =
VAR temptable =
SUMMARIZE (
Table1,
Table1[account],
Table1[date].[Quarter],
"Judge", SUM ( Table1[value] )
)
RETURN
CALCULATE ( COUNTROWS ( FILTER ( temptable, [Judge] > 0 ) ) )The result will like below:
Best Regards,
Teige
Basically, to put this in simpler terms, is there a way to Distincally Count a range of values based on a criteria that sums up their revenue based on all their transactions not just individual transactions.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.