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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
egiam
Frequent Visitor

Filter Function

I have a dax formula that I need to add a filter to.  I tried the following but it didn't work.  Any idea what I'm doing wrong? Thanks!

 

if( 'FACT CA Contract'[AR Elig] = 0,

0,

 ('FACT CA Contract'[AR Cont] / 'FACT CA Contract'[AR Elig] )

FILTER('AR IND Desc',

OR(

'AR IND Desc'[AR_IND_DESC] = "Assisted",

'AR IND Desc'[AR_IND_DESC] = "None")))

 

1 ACCEPTED SOLUTION
egiam
Frequent Visitor

Thanks I found my error.

View solution in original post

4 REPLIES 4
egiam
Frequent Visitor

Thanks I found my error.

amitchandak
Super User
Super User

@egiam , Try like

if( 'FACT CA Contract'[AR Elig] = 0,
0,
calculate( ('FACT CA Contract'[AR Cont] / 'FACT CA Contract'[AR Elig] )
FILTER('AR IND Desc',
OR(
'AR IND Desc'[AR_IND_DESC] = "Assisted",
'AR IND Desc'[AR_IND_DESC] = "None"))) )

 

But are you trying to create a measure or a column ?

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

trying to create a measure

@egiam If it's a measure, you'll need to use an aggregator like SUM.

 

Customer Sold per Age Group =
CALCULATE (
    DIVIDE (
        SUM ( 'FACT CA Contract'[AR Cont] ),
        SUM ( 'FACT CA Contract'[AR Elig] ),
        0
    ),
    FILTER (
        VALUES ( 'AR IND Desc'[AR_IND_DESC] ),
        'AR IND Desc'[AR_IND_DESC] IN { "Assisted", "None" }
    )
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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