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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Measure to count the number of Opps that contain a certain product

This post has now been deleted. 

3 REPLIES 3
Fowmy
Super User
Super User

@Anonymous 

Can you share some sample data and the expected result to have a clear understanding of your question?
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?

_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

This post has now been deleted.

@Anonymous 

Create one of the following measure. I filter the Sales Stage, I get one as the result:

Count Measure = 

VAR __Table = { "Dragon Fruit", "Lychee", "Passion Fruit" }
VAR __Table2 =
    ADDCOLUMNS (
        FILTER( table8, Table8[Sales Stage] = "06 - Won, Deploy & Expand"),
        "Exists", INT ( Table8[Product Category - Custom Group] IN __Table )
    )
RETURN
    COUNTROWS (
        FILTER (
            GROUPBY (
                __Table2,
                Table8[Opportunity ID],
                "Count", SUMX ( CURRENTGROUP (), [Exists] )
            ),
            [Count] > 1
        )
    )

To get the 2 as the result, remove filter on Sales Stage:

Count Measure = 

VAR __Table = { "Dragon Fruit", "Lychee", "Passion Fruit" }
VAR __Table2 =
    ADDCOLUMNS (
        // FILTER( table8, Table8[Sales Stage] = "06 - Won, Deploy & Expand"),
        Table8,
        "Exists", INT ( Table8[Product Category - Custom Group] IN __Table )
    )
RETURN
    COUNTROWS (
        FILTER (
            GROUPBY (
                __Table2,
                Table8[Opportunity ID],
                "Count", SUMX ( CURRENTGROUP (), [Exists] )
            ),
            [Count] > 1
        )
    )

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn





 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.