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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX question for create a new column

Hi, 

I want create a column for my customer table, but my DAX did not work very well.

So I want my column can satisfy 3 condtions, ProductID is 1102, and Date belong to 2017, Also the version could be Ver 1 or Ver 3, then in my new column could be marked as Yes, but in my result, it missed one(Redline marked)

I want to know the correct DAX to satisfy my condition. 

Thank you!

Inked3231231_LI.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

Below is an example of what you are trying to achieve

 

Confirm = IF(AND('Table'[ProductID] = 1102, AND('Table'[Date].[Year] = 2017, OR('Table'[Version] = "Ver 1", 'Table'[Version] = "Ver 2"))), "Yes", "")

Capture.PNG

View solution in original post

4 REPLIES 4
jherralo95
Frequent Visitor

Try with:

 

Confirm = IF(AND(Customer[ProductId]="1102";YEAR(Customer[Date])=2017;OR(Customer[Version]="Ver 1";Customer[Version]="Ver 3"));"Yes";"")
Anonymous
Not applicable

Hi @Anonymous 

 

As you have 3 conditions, you will need to use nested AND statements e.g. if(AND(condition 1, AND(condition 2, OR(Condition3, condition 4)))

 

Try that and let me know if it works. Alternatively if you could share the PBI file, it would be helpfull

Anonymous
Not applicable

Hi @Anonymous 

Below is an example of what you are trying to achieve

 

Confirm = IF(AND('Table'[ProductID] = 1102, AND('Table'[Date].[Year] = 2017, OR('Table'[Version] = "Ver 1", 'Table'[Version] = "Ver 2"))), "Yes", "")

Capture.PNG

Anonymous
Not applicable

Thank you !

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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