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
irenelitw629
Helper II
Helper II

Distinct count of number based on sales amount

Hi everyone,

 

I have one set of sales date as per below example. I want to create a measure to get distinct count of opportunity parent when the sales amount is  >=$1m.

Sales quarterOpportunity Parent numberOpportunity NumberProductSales Amount
22-Q2OPTY5071363OPTY5071363TF $ 1,638,334
22-Q2OPTY5052097OPTY5052097IM $ 405,441
22-Q2OPTY5052097OPTY5075331IM $ 800,000
22-Q1OPTY5080075OPTY5080075CF $ 1,500,000

 

I have sales quater and product filter in the visualization - so the filter needs to apply to the measure as well.

For example, when no sales quarter is selected, the distinc parent number count should be 3.

When IM product is selected, it should be 1 distinc parent number count.

Sales quarterOpportunity Parent numberOpportunity NumberProductSales Amount
22-Q2OPTY5052097OPTY5052097IM $ 405,441
22-Q2OPTY5052097OPTY5075331IM $ 800,000

 

Any idea what should be the measure? I have tried filter all, Allselected, group by but it is not working.

 

Here is the sameple file

https://drive.google.com/file/d/1MeOON5tvU4ARZjRLoUOy6GPFOZMnpDlr/view?usp=sharing

 

Thanks!!

2 REPLIES 2
irenelitw629
Helper II
Helper II

Thanks Amit. It works but only when account name is in the table. Is there anyway to show this as scorecard without pulling account name in the table?

amitchandak
Super User
Super User

@irenelitw629 , Try measure like

calculate( countx(filter(summarize(Table, Table[Opportunity Parent number], "_1", sum(Table[Sales Amount])), [_1] > 1000000),[Opportunity Parent number]) ,
filter(allselected(Table) , Table[Opportunity Parent number] = max( Table[Opportunity Parent number])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors