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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Afiq_Danial
Helper II
Helper II

Conditional Statement

Hi, 

Does anyone knows of a function to solve this problem? I want to write a conditional statement with DAX.

The problem is  "if there are more than 2 number "5", then ..."

Would appreciate if you guys help me, Thanks!

1 ACCEPTED SOLUTION
mangaus1111
Solution Sage
Solution Sage

Hi @Afiq_Danial ,

you can create this calculated column:

More than 2 "5" = IF('Facts36'[Value1] =5 &&'Facts36'[Value2]=5 && 'Facts36'[Value3] =5,
            "Yes")
and then you can filter the table for "Yes"
mangaus1111_0-1666644505242.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
mangaus1111
Solution Sage
Solution Sage

Hi @Afiq_Danial ,

you can create this calculated column:

More than 2 "5" = IF('Facts36'[Value1] =5 &&'Facts36'[Value2]=5 && 'Facts36'[Value3] =5,
            "Yes")
and then you can filter the table for "Yes"
mangaus1111_0-1666644505242.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mangaus1111
Solution Sage
Solution Sage

Is your table like table A or Table B? Which is your expexted result?

mangaus1111_0-1666642118148.png

 

I have table A just like u created. I want to transform my table A to 

Afiq_Danial_0-1666642344315.png

I only want to display names who has the value "5" more than twice.

mangaus1111
Solution Sage
Solution Sage

Hi @Afiq_Danial ,

 

what do you mean by more than 2 numbers?

Something like this

mangaus1111_0-1666641541564.png

 

James555
Lucas331

 

For example, James' row has the value "5" more than 2. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors