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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ybicalways79
Frequent Visitor

DAX FILTER with multiple criteria

Hello,

 

This has been challenging to figure out.  I have tableA with ITEMs / Category / Sales.  I want add a column "Groups" to that table based on another table below.  lookup to category and then where the sales number fits between MIN and MAX columns.  Is that possible?

 

tableA

ITEMs

ItemCategorySales
OTH-10AC_CAPS0
OTH-12AC_CAPS10
F-30AC_FTG0
H-22AUXCOOL0
H-23AUXCOOL1
H-24AUXCOOL26
H-25AUXCOOL101

 

tableB

GroupsCategoryMinMax
UnrankedAC_CAPS00
A - Rank 1-25AC_CAPS125
UnrankedAC_FTG00
UnrankedAUXCOOL00
A - Rank 1-25AUXCOOL125
B - Rank 26-100AUXCOOL26100
C - Rank 101-250AUXCOOL101250

 

RankGroup =
CALCULATE( SELECTEDVALUE( tableB[Groups], BLANK() ),
    FILTER( ALL( 'tableB' ),
        tableA[Category] = tableB[Category] &
        tableA[Sales] >= tableB[Min] &
        tableA[Sales] < tableB[Max])
)
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

RankGroup=MAXX(FILTER(TableB,TableB[Category]=TableA[Category]&&TableB[Min]<=TableA[Sales]&&TableB[Max]>=TableA[Sales]),TableB[Groups])

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

RankGroup=MAXX(FILTER(TableB,TableB[Category]=TableA[Category]&&TableB[Min]<=TableA[Sales]&&TableB[Max]>=TableA[Sales]),TableB[Groups])

Thanks!  Worked perfectly

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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