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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

How to list who are the customer buying Brand A and Brand B ?

Hi All

 

it there a simple approach to create a expression to filter customer who buy below 2 Brand ?

For example if user select GE and REDLION from Slicer , it will list the customer name that buying these 2 brand.

Paulyeo11_0-1608562165437.png

 

My PBI file :-

 

https://www.dropbox.com/s/ftug7f0fsa9fyqu/PBT_V01015%20Buy%20Brand%20A%20and%20B.pbix?dl=0

 

Paul

 

Paul Yeo

3 ACCEPTED SOLUTIONS
AlB
Super User
Super User

Hi @Paulyeo11 

1. Place SALES[COMPANY] in a table visual

2.  Create this measure:

ShowMeasure = 
VAR numSelected_ = DISTINCTCOUNT( SALES[BRAND] )
VAR res_ =  IF (
        COUNTROWS ( FILTER ( DISTINCT ( SALES[BRAND] ), [SALES_] > 0 ) ) = numSelected_,
        1,
        0
    )
RETURN
res_

 3.  Place [ShowMeasure] as a visual filter and choose to show when value is 1

 4. See it all at work in the attached file (BRAND page)

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

View solution in original post

AlB
Super User
Super User

@Paulyeo11 

See it all at work in the attached file (page BRAND 2). Note you must not make a selection in the slicer in this case.

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Cheers 

 

SU18_powerbi_badge

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

See if my solution here helps - Identify Customers that Organisations can upsell or cross sell their products to.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

See if my solution here helps - Identify Customers that Organisations can upsell or cross sell their products to.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ash

thank you very much for sharing the link , that is what I am looking for

AlB
Super User
Super User

@Paulyeo11 

See it all at work in the attached file (page BRAND 2). Note you must not make a selection in the slicer in this case.

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Cheers 

 

SU18_powerbi_badge

AlB
Super User
Super User

@Paulyeo11 

You can follow the same pattern and create another measure that will be used as filter visual.

ShowMeasure 2 =
VAR numSelected_ =
    DISTINCTCOUNT ( SALES[BRAND] )
VAR res_ =
    IF (
        CALCULATE ( [SALES_], SALES[BRAND] = "BECKHOFF" ) > 0
            && CALCULATE ( [SALES_], SALES[BRAND] = "MOXA" ) = 0,
        1,
        0
    )
RETURN
    res_

 Although this is not very flexible. You might want to do it with slicers so that you can choose the brands in the slicers rather than hard-code them

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

AlB
Super User
Super User

Hi @Paulyeo11 

1. Place SALES[COMPANY] in a table visual

2.  Create this measure:

ShowMeasure = 
VAR numSelected_ = DISTINCTCOUNT( SALES[BRAND] )
VAR res_ =  IF (
        COUNTROWS ( FILTER ( DISTINCT ( SALES[BRAND] ), [SALES_] > 0 ) ) = numSelected_,
        1,
        0
    )
RETURN
res_

 3.  Place [ShowMeasure] as a visual filter and choose to show when value is 1

 4. See it all at work in the attached file (BRAND page)

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Paulyeo11
Impactful Individual
Impactful Individual

Hi AIB

Appreciated very much for your sharing , can you advise me how to filter those customer Buy Beckhoff and not buy MOXA ?

Paulyeo11_0-1608589988511.png

 

amitchandak
Super User
Super User

@Paulyeo11 , Please find the file attached after the signature. Check for measure All

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.