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

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

Reply
dw700d
Post Patron
Post Patron

simple filter measure

I have a list of over 5,000 Purchase order numbers. Each Purchase order can have a variety of different account codes attached to it. There are 14 account codes. I would like to Identify Purchase orders that do not have account code (10C) attached to it. For Example in the table below  Purchase order 2,4,6,8 would qualify as a purchase order that does not have account code 10C. Purchase order 1 would not qualify because although it has other account codes it also has 10C. How can I create a measure that allows me to only view purchase orders without account code 10C?

 

Purchase Order No     Acct Cd               Sum of Amt
110C9624.26
120B14209.52
120C9001.25
220D3624.93
220B26953.98
310C1750.5
420E1425.67
420D35491.18
420A2450.15
510C12901.04
620A4593.94
620B833.9
710C200
720A486.39
720B100
820A156
820C122
1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @dw700d 

 

Try this measure :

Purchase <>(10C) = 
VAR _Count10C =
    CALCULATE (
        COUNT ( 'Table'[Sum of Amt] ),
        ALLEXCEPT ( 'Table', 'Table'[Purchase Order No] ),
        'Table'[Acct Cd] = "10C"
    )
RETURN
    IF ( ISBLANK ( _Count10C ), 0, _Count10C )

 

and filter the new meausre to show zero.

Output:

VahidDM_0-1632805432049.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @dw700d 

 

Try this measure :

Purchase <>(10C) = 
VAR _Count10C =
    CALCULATE (
        COUNT ( 'Table'[Sum of Amt] ),
        ALLEXCEPT ( 'Table', 'Table'[Purchase Order No] ),
        'Table'[Acct Cd] = "10C"
    )
RETURN
    IF ( ISBLANK ( _Count10C ), 0, _Count10C )

 

and filter the new meausre to show zero.

Output:

VahidDM_0-1632805432049.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

amitchandak
Super User
Super User

@dw700d , Plot this as total or with purcahse order no

 


Measure =
var _1 = calculate(sum(Table[Amt]), filter(Table, Table[Acc Cd] ="10C"))
return
countx(values(Table[Purchase Order No]), if(isblank(_1) ,[Purchase Order No], blank()))

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors