Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I want to make new column in which I want to put the content of an existing colomn "A" or the content from the previous row of the new colom depending on the content of column "A".
In Excel I can use this formula: IF(left(A2;1)="-";C1;B2)
I've tried several options (even chat GPT) but it won't work.
Kind regards,
Domien
Solved! Go to Solution.
watch my video and you will find out how to do this
watch my video and you will find out how to do this
Thanks!. This works perfect for me!!
@Domien Hello,
you can refer this dax.
Create a column then create the same measure and replace the result and alternate result column.
@Domien Hello,
I meant this.
Hi Harish,
I'm sorry but I don't know what you mean
Thanks, for the quick reply.
I've tried something simular but when I use your solution I get errors whent the first character is an "-"
I've used this formula. I've checked the column names so that could not be the problem
In Power Query, you can create a new column that depends on the content of an existing column "A" or the content from the previous row of the new column based on the content of column "A." You can achieve this using the following steps:
Open Power Query Editor in Power BI or Excel.
Select your table that contains column "A."
Go to the "Add Column" tab and click on "Custom Column."
In the "Custom Column" dialog box, enter a name for the new column (e.g., "NewColumn").
In the "Custom column formula" box, enter the following formula:
if Text.Start([A], 1) = "-" then [NewColumn]{[Index]-1} else [A]
This formula checks if the first character of column "A" is "-", and if it is, it retrieves the value from the previous row of the "NewColumn"; otherwise, it takes the value from column "A."
This will create a new column "NewColumn" that meets your specified conditions. If the first character of column "A" is "-", it will take the value from the previous row of "NewColumn"; otherwise, it will take the value from column "A."
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.