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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Learning

Hi

I am experimenting with the following but finding that the filter criteria is not working as i expected but not sure why from what i have read.

2019-20 ACTUAL Income EXCL 100 =  CALCULATE(

[2019-20 Totals],

NOT BIGL_BSCC_DATA_181920[ACCT_CATEGORY] IN {"100"},
'BIGL_GL_DATA_181920V2'[INCOME_EXP] IN { "ACTUAL Income" }
)
The goal is to sum the values but exclude 100 have i done something wrong?
 
Thanks in advance
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @nandukrishnavs 

 

A better formulation of your measure is this:

2019-20 ACTUAL Income EXCL 100 =
	CALCULATE (
	    [2019-20 Totals],
	    KEEPFILTERS(
	    	BIGL_BSCC_DATA_181920[ACCT_CATEGORY] <> "100"
	    ),
	    KEEPFILTERS(
	    	'BIGL_GL_DATA_181920V2'[INCOME_EXP]  = "ACTUAL Income"
	    )
	)

It's better in 2 ways. First, it's a bit less to type. Second, it's more performant for 2 reasons:

1) you should not put a full table as a filter in CALCULATE if there's no real need (there seldom is),

2) KEEPFILTERS is faster.

 

And the golden rule of DAX says: Never filter a table when you can filter a column.

 

All these things can be discovered through www.sqlbi.com, the site by The Italians.

 

Best

D

View solution in original post

3 REPLIES 3
nandukrishnavs
Super User
Super User

@Anonymous 

Try this measure

 

2019-20 ACTUAL Income EXCL 100 =
CALCULATE (
    [2019-20 Totals],
    FILTER (
        'BIGL_BSCC_DATA_181920',
        NOT ( BIGL_BSCC_DATA_181920[ACCT_CATEGORY] IN { "100" } )
    ),
    FILTER (
        'BIGL_GL_DATA_181920V2',
        'BIGL_GL_DATA_181920V2'[INCOME_EXP] IN { "ACTUAL Income" }
    )
)

 

 If this is not working, please share sample dataset and logic of [2019-20 Totals]

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Anonymous
Not applicable

Hi @nandukrishnavs 

 

A better formulation of your measure is this:

2019-20 ACTUAL Income EXCL 100 =
	CALCULATE (
	    [2019-20 Totals],
	    KEEPFILTERS(
	    	BIGL_BSCC_DATA_181920[ACCT_CATEGORY] <> "100"
	    ),
	    KEEPFILTERS(
	    	'BIGL_GL_DATA_181920V2'[INCOME_EXP]  = "ACTUAL Income"
	    )
	)

It's better in 2 ways. First, it's a bit less to type. Second, it's more performant for 2 reasons:

1) you should not put a full table as a filter in CALCULATE if there's no real need (there seldom is),

2) KEEPFILTERS is faster.

 

And the golden rule of DAX says: Never filter a table when you can filter a column.

 

All these things can be discovered through www.sqlbi.com, the site by The Italians.

 

Best

D

@Anonymous  Thanks


Regards,
Nandu Krishna

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.