Forum Discussion
New Column based upon other two columns
Hi Experts,
Please Help me out on this data.
| Type | Action | Serial No |
| Free | Green | 1 |
| Free | Red | 2 |
| Paid | Red | 3 |
| Paid | Green | 4 |
| Free | Green | 5 |
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
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.
1 Reply
- SmauroSolution 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.