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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
e175429
Helper IV
Helper IV

How to use Calcute Function to filter for 2 numbers

Hi All,

 

What is the correct way to filter a column for 2 numbers?

I want to filter so that i get a total number of selection for 9 and 7

 

e175429_0-1681333084042.png

So far I have:

eROW = calculate([total respondents], OCE[Row] = "9,7")

wich obviously is not correct.

Then I thought it would be:

eROW = calculate([total respondents], OCE[Row] = "9" and "7")

but that's not right either

 

 

 

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @e175429 

try like:

eROW = 
calculate(
    [total respondents], 
    OCE[Row] IN {9,7}
)
 
or
 
eROW =
calculate(
[total respondents],
OCE[Row] IN {"9","7"}
)

View solution in original post

2 REPLIES 2
e175429
Helper IV
Helper IV

Thank you @FreemanZ 

 

The second option worked 

 

eROW =
calculate(
[total respondents],
OCE[Row] IN {"9","7"}
FreemanZ
Super User
Super User

hi @e175429 

try like:

eROW = 
calculate(
    [total respondents], 
    OCE[Row] IN {9,7}
)
 
or
 
eROW =
calculate(
[total respondents],
OCE[Row] IN {"9","7"}
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.