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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors