- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to add a column to a table by comparing another table
Hi everyone,
I am trying to add a custom column by comparing a different table. To simplify let's say I have 2 tables (or 2 queries or 2 datasets). One is called June and another is called July. Both tables are almost identical. both have 2 columns; Client name and sales amount. Sometimes Order placed are canceled, let's say a client placed an order in June and canceled it in July. Now I want to create a column in June called canceledINjuly. I want to compare rows between both tables and put VALUE 1 next in the canceledINjuly column.
I am new to POWERBI. Is there a custom column code I can use in power query?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @LordSnow ,
this is doable. please provide a sample data and your desired output to help you better
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @mussaenda for replying. Here I am providing 2 tables, with just 10 entries. IRL I have 1000s of entries for each month.
This is June Table:
This is July Table:
Now, as you can see in the July table the 1st and the 5th entries are not the same, that is because John Smith and David Lee canceled their orders during the month of July. So I want the PowerBI to automatically add value 1 in the June table column 'canceled in July':
Thank you for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank You This Works!! I am very grateful for this solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so you are saying that every month is one table?

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
Anonymous
| 04-18-2023 06:18 AM | ||
03-24-2024 09:14 PM | |||
03-06-2024 10:27 AM | |||
01-02-2024 11:33 AM | |||
07-24-2023 08:26 AM |
User | Count |
---|---|
33 | |
18 | |
14 | |
11 | |
10 |