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
lkshck
Helper III
Helper III

Create costum column with IF statement based on Data source

Hey,

I'm using Azure Cost Management Connector in PowerBI and I would like to combine two tables together. I already did this via the Append query and it works fine, but I would like to add a custom column to the final Table which contains the information from which Table the data intially comes from. 

Setup looks like the following.

1. Table contains Actual Cost

2. Table contains Amortized Cost

In both tables there is no information about, that it's actual or amortized cost. The only difference is in the PowerQuery where it looks like this:

lkshck_0-1677074477728.png

The first table has "Key="usagedetails"" and the second table has "Key="usagedetailsamortized"". I would like to add this information about actual or amortized cost to a custom column so I can filter later for the Reports. 

 

Any suggestion how this would be possible?

 

Thanks in advance!

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

In power query on the individual table queries (the ones that feed into the combine query) you could add a custom column of 'Cost Type' and set it to Actual or Amortized.  Then that column will be included when you append them together.

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

In power query on the individual table queries (the ones that feed into the combine query) you could add a custom column of 'Cost Type' and set it to Actual or Amortized.  Then that column will be included when you append them together.

Worked, thanks for the hint!

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.