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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pucities
Frequent Visitor

CALCULATETABLE and OR (double pipes)

 

I have a table that looks like below: 

StudentIDTest1Test2Test3Test4Test5
19371566660
25954587851
39559817485
48258918659
563100889250

 

I want to create a filtered table that has the same columns except it only has students who have 80 or above on at least one test. 

 

In my example, since StudentID =2  has never had a test score higher than 80, it should be excluded in the new table.

 

StudentIDTest1Test2Test3Test4Test5
19371566660
39559817485
48258918659
563100889250

 

 

Here's my failed attempt: 

 

 

CALCULATETABLE(Score, Test1>=80 || Test2>=80 || Test3>=80 || Test4>=80 || Test5>=80)

 

 

 

 

 

Thank you,

 

1 ACCEPTED SOLUTION

Hi @pucities ,

 

Check the file again, I've changed it.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

5 REPLIES 5
camargos88
Community Champion
Community Champion

Hi @pucities ,

 

Check this file as an example: Download PBIX 

 

I've unpivoted the value columns, so you can filter it. Also I've created another table as example, if necessary.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Thank you for your reply. 

 

Sorry I haven't been clear. 

 

But I want the new table to have the same columns. Also, I just want to include all 5 scores for students who had >=80 on at least one test.

 

 

Hi @pucities ,

 

Check the file again, I've changed it.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Thank you!!

 

Do you know if there's any way to do it without pivot/unpivot the table just using DAX? 

Hi @pucities ,

 

Yes, it's possible to do it using only DAX. It's the same code, you need to change the filter for your columns with or condition.

However you are gonna have to type all columns always for any calculation.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.