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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Excluding rows from Calculated table

Hi All,

 

I need to create a new table with DAX, excluding rows where STATE = STATE1 AND BRAND = BRAND1

 

Here is my dummy data: Table1

STORESTATEBRANDANSWER
STORE1STATE1BRAND11
STORE1STATE1BRAND20
STORE1STATE1BRAND31
STORE2STATE2BRAND11
STORE2STATE2BRAND21
STORE2STATE2BRAND30
STORE3STATE1BRAND10
STORE3STATE1BRAND21
STORE3STATE1BRAND30

 

I know I have to use CALCULATETABLE but I don't know how to filter out both conditions.

 

This is did I have so far:

Table2 = CALCULATETABLE( SUMMARIZE( Table1 , Table1[STORE], Table1[STATE], Table1[BRAND] ),

 ... )
 
Regards,
Rob
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

I loaded your data into a table 'Table1' 

table1.jpg

Then created a Table2 using the measure

Table2 = FILTER ( Table1, NOT ( Table1[STATE] = "State1" && Table1[BRAND] = "Brand1" ) )

Table2.jpg

 Leaving a table with no row that is a State1 Brand1 row.  Was that what you were looking for?

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hii RobinDeFal

 

You want like this.....?

 

Table2= CALCULATETABLE(Table1,FILTER(Table1,Table1[STATE]<>"STATE1"),Table1[BRAND]<>"BRAND1")

 

 

jdbuchanan71
Super User
Super User

I loaded your data into a table 'Table1' 

table1.jpg

Then created a Table2 using the measure

Table2 = FILTER ( Table1, NOT ( Table1[STATE] = "State1" && Table1[BRAND] = "Brand1" ) )

Table2.jpg

 Leaving a table with no row that is a State1 Brand1 row.  Was that what you were looking for?

 

 

Anonymous
Not applicable

@jdbuchanan71 thanks that 's exactly what I was looking for. I wasn't sure how to use the NOT function.

Cheers

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors