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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Creating new column

Hello

I would like to create a new colum in power BI. The excel formula used to generate this column was, New column =IF(AND(BE74="STORE";BF74="Customer";A74="SM2";AI74=0 );1;0). 

What would its equivalent in power BI be? Thanks in advance!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Try the following column formula:

Column = 
IF (
    'Table'[AI] = BLANK (),
    0,
    IF (
        'Table'[BE74] = "Store"
            && 'Table'[BF74] = "Customer"
            && 'Table'[A74] = "SM2",
        1,
        0
    )
)

vhenrykmstf_0-1649129028903.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

7 REPLIES 7
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Try the following column formula:

Column = 
IF (
    'Table'[AI] = BLANK (),
    0,
    IF (
        'Table'[BE74] = "Store"
            && 'Table'[BF74] = "Customer"
            && 'Table'[A74] = "SM2",
        1,
        0
    )
)

vhenrykmstf_0-1649129028903.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Anonymous
Not applicable

Hii. Sorry for the late response. It worked. Thank you very much.

 

truptis
Community Champion
Community Champion

hi @Anonymous ,

Please try this:

Result= if(Tablename [BE]="Store" && Tablename[BF]="Customer" && Tablename[A]="Sm2" && Tablename [AI]=0, 1, 0)

Anonymous
Not applicable

Thank you for the response. I am sorry that I forgot to mention that the [AI] is a date column which contains "null" and dates. So I prefer to have [AI] = null in the formala I mentioned.

When I tried the formula you suggested it showed error due to this. In this case what would the updated formula be? Thanks!

Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

Column = IF([BE]="STORE" && [BF]="Customer" && [A]="SM2" && [AI]=0,1,0)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

Thank you for the response. I am sorry that I forgot to mention that the [AI] is a date column which contains "null" and dates. So I prefer to have [AI] = null in the formala I mentioned.

When I tried the formula you suggested it showed error due to this. In this case what would the updated formula be? Thanks!

Anonymous
Not applicable

Thank you for the response. I am sorry that I forgot to mention that the [AI] is a date column which contains "null" and dates. So I prefer to have [AI] = null in the formala I mentioned.

When I tried the formula you suggested it showed error due to this. In this case what would the updated formula be? Thanks!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.