Multi Column records keep last version - excel

Hello I am trying to use Excel Power Query to do the following.
I have multiple columns
Order / Item / Version / Qty / Price
I have multiple versions of Order Items so want to keep the last version of the record
I'm thinking keep order item where version is max.
snapshot of what I want to keep
I tried using list.max but not sure the syntax. I played around with grouping columns and conditional column. I think I am on the right track but just not sure how to generate the functions I need.

It is hard to tell if you want the max version of [Order & Item] or [Order] or [Item]
I am going to assume you want to only keep the highest version number of the combination of Order & Item
Load the data into powerquery. Data .. from table/range....
Click select Order and Item columns, right click, Group By
Set up the group like below image . Column Count / Operation Max /on Version column, and column Data / Operation All Rows
use arrows atop the new column to expand all the columns [x] except the ones you used in the initial group; here we just need to [x] version column
Add column .. custom column ...
= if [Count]=[#"CHANGE_VERSION_NUMBER"] then "keep" else "remove"
Then use the drop down in that column to unitick and filter out [x] the remove word
Right click and remove any extra columns
file.. close and load .... your data back into excel

Related

Excel Power query merging different workbooks

I can't find the solution for the problem described here.
I have an Excel file with sales data of 2020 and another one with data for 2021, with lots of rows, so if I copy paste one below the other in the other Excel, I can't use pivot data because too many rows, so I want to merge my 2 Excel files in this way:
First table:
Second table:
Desired final table (in Excel):
Is there any way I can do that with power query or something else in Excel?
Note: my table doesn't have just Sales 2020 in 2021, but also other data, but for simplicity I didn't include it there (example: growth 2020, growth 2021)
So if anyone can help me I will appreciate it a lot!
I would start with 2 queries, each one would just read the rows from First table and Second table respectively.
Then I would start a new query by Reference to the First query.
In this Output query I would add a Merge Queries step, matching the first 3 columns from the First and Second queries. I would set the Join Type set to Full Outer Join.
Next in the Expand step I would return all the columns from the Second table.
Finally I would add 3 columns using the Conditional Column option, to create merged versions of Name, Surname and Month. For example:
= if [Name] = null then [Second.Name] else [Name]
Finally I would remove the un-needed columns, rename and re-order the columns if needed.

Excel - Find all items that share a common cell value

I am wanting to search this list:
The goal is to determine what all is inside Basket 1, determine which item of those costs the most, and return the color of that specific item. My brain is having a hard time determining the right path for this.
With a Pivot Table, you can resume data based on basket # and then filter by most valuable item, and get the color.
The set up for this Pivot Table is all fields into Rows Section, except Amount that will go into values.
NOTE: Even if my Excel language is different than yours, options I'm using should be in the same position. But anyways, besides set up from the image above, you need to apply a value filter (not label filter!), to field ID and make sure choose option TOP 10 and set it to show just TOP 1
If you just want the most expensive item, ignoring Basket #, just remove field Basket from your Pivot Table, and it will work.
Actually you could have 2 Pivot Tables, each one set up in a different way (all baskets, or each basket).

How to merge 2 BIG Tables into 1 adding up existing values with PowerQuery

I have 2 big tables (1 has 690K Rows, 2nd one has 890K rows).
They have the same format and columns:
Username - Points - Bonuses - COLUMN D... COLUMN - K.
Lets say in the first table i have the "Original" usernames and in the 2nd table i have "New" usernames + Some of the "Original" usernames (So people who are still playing + people who are new to the game).
What I'm trying to do is to merge them so i can have in a single table (sum up) their values.
I've already made my tables proper System Tables.
I created their connection in the workbook.
I've tried to merge them but i keep getting less rows than i expect to have, so some records are being left out or not being summed.
I've tried Left Outer, Right Outer, Full Outer with no success.
This is where im standing:
As #Jenn said, i had to append the tables instead of merging them and i also used a filter inside PowerQuery to remove all blanks/zeros before loading it into Excel, i was left with 500K Unique rows, instead of 1.6 Million. Thanks for the comment!
I would append the tables, as indicated above. First load each table separately into PowerQuery, and then append one table into the other one. The column names look a little long and it may make sense to simplify the column names so that the system doesn't read them as different columns due to an inadvertent typo.

Extracting specific rows from one table to another on Excel

I have a three-column table on excel to keep track of my expenditures; the first column shows what the purpose of the expenditure was, the second shows the amount and on the third I put a "P" for transactions that are still pending on my credit card. I wish to extract the rows of the transactions that are still pending to another table (same sheet) so that I can view what is still pending seperately. It should auto update i.e. new entries should be added as I add new transactions to my table and older entries should be removed if I remove the P from the main table (the transaction gets posted). Thank you in advance.
I would just use filtering. Select the column headers (presumably A1 to C1), then click Home -> Editing (farthest section on right by default) -> Sort & Filter -> Filter.
The column headers then have a drop down menu that allow you to sort your fields alphabetically or from lowest to highest (or vice versa) or oldest to newest. Then below you can select what values to show, in this case "Pending", and only those rows will show. Bottom left of Excel will tell you how many rows out of total rows are showing too so you can quickly see how many transactions are pending.

MVC 5 related to views settings for grid acc. to view indexing

I have a list where I am getting all data approx. 50 columns with foreign key tables data through a model.
my second list where I am getting only columnname in rows approx. 10 columname,it can be more acc. to condition ,
now I want to bind a table using 2nd table column name and data will come from first list..because that columns are available in 1st list..so I want only those column name using mvc.. is it possible ?
note : I am using this things for viewsettings acc. to diff. diff. view which we are creating ...so please tell me how can I map rows of 2nd list with column of 1st list using mvc query...

Resources