Forum Discussion
C4L84
4 years agoAdvocate II
Addcolumn with if statement
Hi community, I'm looking for some help with an ADDCOLUMN expression. I need to add a new column called "RevenueType" in the BookingStatus table which groups BookingCodes A, R, H and CX as "C...
Vasuno1
3 years agoFrequent Visitor
I am not sure that you need to use the addcolumn function for this but if you really need to let me know.
I achieved what you are looking for by adding a new column as shown below:
Then I inputted the following in the formula bar:
RevenueType = IF('Booking statuses'[BookingCode] in {"A","R","H","CX"},"Confirmed Revenue", "Provisional")RevenueType = IF('Booking statuses'[BookingCode] in {"A","R","H","CX"},"Confirmed Revenue", "Provisional")
See result below: