Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |