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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mrouxfrench
Frequent Visitor

Filter my data by a measure

Hi,
I would like to create a slicer which filters my data following a measure value.

Basically my data is a fact table storing customers purchases monthly:

Customer IDMonthNb purchases
AOctober13
BOctober8
ANovember14
CNovember20
BDecember31

 

I created a measure that calculates for my customers if they appear in all selected months or not (returns "Yes" or "No" for each customer)

 

Now I want a to set a slicer with Yes/No options.

For example in the above example: let's say I selected months October and November in a slicer, I would like a new Yes/No slicer that updates my table on customer A rows (because he appears in oct and nov)

Customer IDMonthNb purchases
AOctober13
ANovember14

 

Can someone help me on this?

Sorry if it's obvious to you, I claim myself to be a PBI newbie 🙂

1 REPLY 1
amitchandak
Super User
Super User

@mrouxfrench , Not very clear , Try a measure like

 

measure =
var _max = maxx(allselected(Table), Table[Month])
return
if(calculate(distinctcount(Table[Month]), allexcept(Table, Table[Customer ID])) >=_max, "Yes", "No")

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors