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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Need a new column with specific data from another column

Hi,

 

I got a column named " Type of expense"" with 11.000 rows. In this column a type of expense is salary. How do I make a new column, which only show salary? and a new colum showing the amount? The data in the new columns should ofcourse be in the same rows as the information where I pull it from.

 

Regards Jonas

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found the answers elsewhere:

 

You get the formula in danish:

 

1 new column with only the name "Salary" (Lønudgifter in danish)

 

Lønudgifter = IF(Ark1[Type af udgift]="Lønninger";"Lønninger";"")

 

1 new column with only the name "Salary amount" (Løn beløb in danish)

 

Løn beløb = IF(Ark1[Lønudgifter]="Lønninger";Ark1[Forbrug])

 

Best regards Jonas

View solution in original post

4 REPLIES 4
jthomson
Solution Sage
Solution Sage

Not sure what your data looks like - if you have separate columns for the type of expense and the amount of expense, then just make a new column using something like if([expense type]="salary", [expense amount], 0) which will give you a column that only contains amounts when it's a salary type

Anonymous
Not applicable

Hi Jthomsen,

 

I can't make your formula work.

 

I need 2 colums:

 

- 1 column showing the word "Salary"

 

- 1 column showing the "Salary amount"

 

The data where i pull it from is in 2 colums.

 

- 1 column called "Expense type"

 

- 1 colum called "Used".

 

As I see it, I should make a column with a formula like this for the "Salary" column:

 

Salary amount = IF(Spreadsheet1[Expense type"="Salary";"Salary";0)

 

It doesn't work though..

 

And a column called "Used", but here i dont know, how i can find the "Salary amount".

 

Anyone who can help?

 

Its probably easy, when you know, like everything else 😄

 

Regards Jonas

Anonymous
Not applicable

I found the answers elsewhere:

 

You get the formula in danish:

 

1 new column with only the name "Salary" (Lønudgifter in danish)

 

Lønudgifter = IF(Ark1[Type af udgift]="Lønninger";"Lønninger";"")

 

1 new column with only the name "Salary amount" (Løn beløb in danish)

 

Løn beløb = IF(Ark1[Lønudgifter]="Lønninger";Ark1[Forbrug])

 

Best regards Jonas

Seems to be the same principle as what I was suggesting, I guess your local version uses ; instead of , to separate out sections of the formula, glad you got it working

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.