Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I am struggling to create a calculated column based on some conditions in Power Bi.
Refer to the below sample data there are 4 products against a single Cust Code. My condition is if a Cust Code has this product "5" then mark as "YES" else "NO " against Cust Code .(refer to desired results )
Please help me with the DAX formula to achieve desired results.
| Cust Code | Product | Status desired results |
| A | 1 | NO |
| A | 2 | NO |
| A | 3 | NO |
| A | 4 | NO |
| B | 1 | YES |
| B | 2 | YES |
| B | 3 | YES |
| B | 5 | YES |
| C | 1 | NO |
| C | 2 | NO |
| C | 3 | NO |
| C | 4 | NO |
| D | 5 | YES |
| D | 2 | YES |
| D | 3 | YES |
| D | 4 | YES |
Solved! Go to Solution.
Result CC : =
VAR _currentcustcode = Data[Cust Code]
VAR _filtertableproduct =
SUMMARIZE ( FILTER ( Data, Data[Cust Code] = _currentcustcode ), Data[Product] )
RETURN
IF ( 5 IN _filtertableproduct, "YES", "NO" )
https://www.dropbox.com/s/2o32swo7r1aidwu/lavdeepkv2.pbix?dl=0
Result CC : =
VAR _currentcustcode = Data[Cust Code]
VAR _filtertableproduct =
SUMMARIZE ( FILTER ( Data, Data[Cust Code] = _currentcustcode ), Data[Product] )
RETURN
IF ( 5 IN _filtertableproduct, "YES", "NO" )
https://www.dropbox.com/s/2o32swo7r1aidwu/lavdeepkv2.pbix?dl=0
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.