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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Need to create a Measure to place it at visual level filter

Hi Team,

 

Need help to create a measure which i will be using as visual level filter on a Report. 

 

 I have a customer table with customerid, I dont want to create calcualted column but make use of mesaure.

 

Code logic that i would like to have in measure.

 

Customerid not in ('1234',2345',3452',2647',2348')

 

Any help is highly appreciated.

 

Thanks in advance.

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Try a measure like

calculate(sum(Table[value]) , filter(table, not(Customerid in {"1234","2345","3452","2647","2348"})))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Perhaps:

 

Measure =
  VAR __CustomerID = MAX('Table'[CustomerID])
  VAR __Table = { '1234',2345',3452',2647',2348' }
RETURN
  IF(NOT(__CustomerID IN __Table),1,0)

IDK, I mocked up both in a sample file and both seem to work. You can just filter on the 1 or the 0. See PBIX attached below sig. You want Page 3, Table (3).

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler ,

 

Thanks for quick response.

 

The measure outputs is showing as 1 for all the values in the list if i use Not function. My desired out put is the customerid column should eliminate those values present in the list.

 

If in a table visual, if I place customerid columns from table and the measure , it should show me those values that are not in the list. 

 

Hope my requirement is clear. 

How about:

 

Measure 3a = 
  VAR __CustomerID = MAX('Table (3)'[CustomerID])
  VAR __Table = { "1234","2345","3452","2647","2348" }
RETURN
  IF(__CustomerID IN __Table,0,1)

 

IDK, I mocked both up in a file (attached below sig) Table (3), Page 3. Maybe because your stuff are numbers 1234, 2345, 3452 instead of text? 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.