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
Syndicate_Admin
Administrator
Administrator

How do I have the Filter Object in "and" on the dashboard?

Hello to tod ,

I need your help.

I have a table with customers and attractions, wanting to know that customers have subjected the attraction not to it. In this way cross selling of attractions that have not been suddenly made.

On the dashboard I had a filter type object which when I selected more than one attraction would give me the result as "OR" and I wanted it to be as "AND".

Customer Attraction

Cl1Worm
Cl2Zip line
Cl2Devil
Cl1Devil
Cl3Devil
Cl3Worm
Cl2Worm
Cl3Zip line
Cl4Worm

Thank you!!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi ,

 

Try to create the following measure and apply it to the corresponding visual level filter.

Measure = 
var count_att=
    CALCULATE(COUNT('Table'[Customer]),
        FILTER(ALLSELECTED('Table'),
            COUNTROWS(
                FILTER('Table',
                    EARLIER('Table'[Customer])='Table'[Customer])
                    )
                )
            )
var count_selected = 
    CALCULATE(
        DISTINCTCOUNT('Table'[Attraction]),
        ALLSELECTED('Table')
        )
return IF(count_selected=count_att,1,0)

V-lianl-msft_0-1611639142797.png

 

 

Best Regards,
Liang
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

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi ,

 

Try to create the following measure and apply it to the corresponding visual level filter.

Measure = 
var count_att=
    CALCULATE(COUNT('Table'[Customer]),
        FILTER(ALLSELECTED('Table'),
            COUNTROWS(
                FILTER('Table',
                    EARLIER('Table'[Customer])='Table'[Customer])
                    )
                )
            )
var count_selected = 
    CALCULATE(
        DISTINCTCOUNT('Table'[Attraction]),
        ALLSELECTED('Table')
        )
return IF(count_selected=count_att,1,0)

V-lianl-msft_0-1611639142797.png

 

 

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

Syndicate_Admin
Administrator
Administrator

Hello

I want to use the object "data segmentation" and that works with an "and" and not with an "or". When you have two options selected from the object, the result is reflected in the table I have created.

Thank you!

lbendlin
Super User
Super User

You need a detached table for the attractions slicer.  Then use VALUES() for the customer attractions and compare it via INTERSECT()  to the FILTERS() of the detached table.  If the tables match then the customer has attended all selected transactions.   Or you can identify which of the selected attractions the customer has not visited by using EXCEPT()

Hello

I created the table, but the rest of the functions I have never used them, can you give an example?
Thank you!!

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.