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

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.

Reply
drrai66
Resolver I
Resolver I

New Column based upon other two columns

Hi Experts,

Please Help me out on this data.

TypeActionSerial No
FreeGreen1
FreeRed2
PaidRed3
PaidGreen4
FreeGreen5

 

I need a Calculation for a NEW Column on the following Condition:

IF TYPE=FREE and Action=GREEN THEN Serial No END

So if both conditions in 2 columns are Satisfied then New column should return that Serial No, so in this case  the New Column should return 1 & 5 only.

Thanks

Deepak

1 ACCEPTED SOLUTION
Smauro
Solution Sage
Solution Sage

You could do it either in Power Query or DAX.
I'm guessing DAX will be easier for you:
If you go to Modeling->New Column and then Write:

Serial No OK = IF ( [Type] = "Free" && [Action] = "Green", [Serial No] )

and that should do it.

 

 

Edit: I should note that the new column in this case will not return only 1 and 5, but also blanks in the rows which do not meet these conditions.




Feel free to connect with me:
LinkedIn

View solution in original post

1 REPLY 1
Smauro
Solution Sage
Solution Sage

You could do it either in Power Query or DAX.
I'm guessing DAX will be easier for you:
If you go to Modeling->New Column and then Write:

Serial No OK = IF ( [Type] = "Free" && [Action] = "Green", [Serial No] )

and that should do it.

 

 

Edit: I should note that the new column in this case will not return only 1 and 5, but also blanks in the rows which do not meet these conditions.




Feel free to connect with me:
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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