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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Daxmon_23
Frequent Visitor

intersection problem

Hello everyone. I am a bit new to Power BI, I am working on a project that consists of how two brands coexist in different points of sale.

AñoMespunto ventaventas PRODUCTO Aventas PRODUCTO B
2022septiembreplace 1199
2022septiembreplace 2 3
2022septiembreplace 343 
2022septiembreplace 41831
2022septiembreplace 556
2022septiembreplace 631 
2022septiembreplace 7 7
2022septiembreplace 8531

 

I have to define how many points of sale sell product A, how many sell product B and how many sell both. Getting the amount of each product was very simple:

 

Number of Places that Sell A = CALCULATE([Total Places] , Sales[VolTotal] > 0, Product = "Product A")

Number of Places that Sell B = CALCULATE([Total Places] , Sales[VolTotal] > 0, Product = "Product B")

 

I understand that to find the place where both are sold I would have to make an intersection of both, but I can't find the way.

I'd appreciate your help.

 

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi Daxmon_23,

 

You can add a measure like this:

SellTwoPlaces =

CALCULATE (

    COUNTROWS ( 'Table' ),

    FILTER (

        'Table',

        AND (

            NOT ( ISBLANK ( 'Table'[ventas PRODUCTO A] ) ),

            NOT ( ISBLANK ( 'Table'[ventas PRODUCTO B] ) )

        )

    )

)

The result is:

vyinliwmsft_0-1669083867022.png

 

Hope this helps you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

View solution in original post

2 REPLIES 2
v-yinliw-msft
Community Support
Community Support

Hi Daxmon_23,

 

You can add a measure like this:

SellTwoPlaces =

CALCULATE (

    COUNTROWS ( 'Table' ),

    FILTER (

        'Table',

        AND (

            NOT ( ISBLANK ( 'Table'[ventas PRODUCTO A] ) ),

            NOT ( ISBLANK ( 'Table'[ventas PRODUCTO B] ) )

        )

    )

)

The result is:

vyinliwmsft_0-1669083867022.png

 

Hope this helps you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

Daxmon_23
Frequent Visitor

This was my attempt but the result appears in 0 

Sell 2 Places =
CALCULATE(DISTINCTCOUNT(sales[Id]), FILTER(Product, AND (Product[Tipe] = "Product A",Product[Tipe] = "Product B")
)
)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.