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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

Thanks I found my error.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thanks I found my error.

amitchandak
Super User
Super User

@Anonymous , 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
Anonymous
Not applicable

trying to create a measure

@Anonymous 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.