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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
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.