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
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
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.