Check all columns

Posts: 16
Joined: Tue Apr 18, 2017 4:04 am

Check all columns

Postby okat » Sat Apr 07, 2018 12:55 am

Every month, I need to perform a repetitive process, for which I need to verify that all the necessary columns are found in the table of origin. For example, in a table I only need the following columns: Employee, payment and discount, but sometimes the discount column does not come in the source table, so I need to create that column with a value in zero. In short, I need to create a column depending on whether it is not included in my original table. I hope you understand. Thanks a lot.

Posts: 1
Joined: Sat Apr 07, 2018 3:35 pm

Re: Check all columns

Postby ochiengapiyo » Sat Apr 07, 2018 3:46 pm

You mean that you want to create a discounts column and populate it with 0 in case it was not existing from the Source data/table?

Posts: 30
Joined: Thu Oct 19, 2017 12:57 pm

Re: Check all columns

Postby RamanaV » Sat Apr 07, 2018 10:47 pm

You can use Power Query to do this job for you.
Add a custom column so that it takes the discount values if present, otherwise takes 0.
You can then rename the new column as the Discount and delete the column you got from the source
This is a one time job to add query steps.

Posts: 6
Joined: Fri Sep 01, 2017 4:33 pm

Re: Check all columns

Postby Rudi » Fri Apr 13, 2018 8:35 pm

See this useful article on the subject by Chris Webb.

Return to “Power Query”

Who is online

Users browsing this forum: No registered users and 1 guest