Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
whodis118
Frequent Visitor

Measure that shows count of distinct items based on two conditions

I am having a problem calculating my measure correctly. Let me explain...

 

I need the DISTINCTCOUNT of equipment items, where the status is active and the utilization is negative. I can easily get a distinct count of active equipment items by using ->

 

Total Active = CALCULATE(DISTINCTCOUNT(Utilization[Equipment]), FILTER(Utilization, Utilization[Status] = "A"))

 

 

However, when I try to account for items that are under utilized, I can't get it to work. Here is one iteration of what I have tried ->

 

Total Active Under Utilized = CALCULATE(DISTINCTCOUNT(Utilization[Equipment]), FILTER(Utilization, Utilization[Status] = "A" && SUM(Utilization[Over Under] )< 0 ))

 

Which gives me the same result.

 

whodis118_0-1663190456241.png

Based on the screenshot here, you can see that I want the Total Active Under Utilized to be 2 because the Total Over Under is only Under for two pieces of equipment in this filter.

 

Does anyone know how I can acheive this?

2 REPLIES 2
whodis118
Frequent Visitor

I may be mis-understanding, but it sounds like the proposed solution is the same as what I have already done? 

"choose this column, filter it <0" is what I have done, no?

 

I need this calculation to reflect the total for the given time frame. Here, the data is filtered to show the last week, and this is the result. Filtering it back two weeks, would add more items and the number would change. 

Anonymous
Not applicable

Hi @whodis118 ,

 

So you want the result show the two equipments,  not three?

vmengzhumsft_0-1663219151324.png

But this sytnax is to filter "over under"<0, in your table , it seems to actually have three, so I think you need to change this filter object, choose this column, filter it <0.

vmengzhumsft_1-1663219338229.png

If I misunderstand your meanings, tell me in time. Thanks in advance~

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.