Adding more condition to Vlookup - vlookup

I want to use vlookup formula with 2 scenarios:
Example: I have sheet 1 with full data and Sheet 2 with other information. In sheet 2 I want to pull those records which exists in sheet 1 with vlookup. I have already wrote that query for vlookup. In same I want to add below conditions:
1) column c2,A2 & G2 of sheet2 are matching in any row of Sheet 1.
My vlookup formula is this:
=VLOOKUP(A2,Sheet3!$A$2:$J$20332,10,FALSE)
There are duplicate rows in column A and thats why it is not working as a primary key. Kindly share your thought.

You should be able to construct a primary key by linking together all the information which will create a singular entry.
Given the limited info you provided I would go with creating in both sheets a new column with:
=A2&C2&G2
You could then do a vlookup based on this singular value and get the information from one sheet into the other.

Related

PowerBI recursion calculation using Dax or Power query - Each row column value needs to refer previous row same column value

I have requirement where I have to apply formula which refers itself (recursive). Each column needs to be refer to previous row column value.
Please find attached excel sheet for formula reference. I need to calculate calc_amt field.
Please check formula used. Field refers itself for index 1 onwards for each uid.
For each uid, eff_date repeats.
Any help here would be great
https://i.stack.imgur.com/aBaae.jpg[enter image description here]1
Ron, sorry I was out of town and sorry for the delayed response.
I wanted to attach the excel sheet with formula but looks excel attachment is not allowed. I have attached the image again taken from excel. Column K has the formula. For index 1 and above, column refers itself. This repeats for each uid.

PowerBI - Duplicate Entries in Query

I have created a query on three tables. Here there is a column GUID (which is actually unique), then there is a column date/time and a column with a phone number.
Now if the same phone number calls more than once, get duplicates with always the same GUID. Can I filter this in Power BI so that the ID only appears once?
If I understand your requirement correct, There is an option in Power Query Editor to remove all duplicate rows. You can first select your all 3 columns- guid, date_time and phone_number. Now right click on any of the Column's header and select Remove Duplicate from the list as shown in the below sample image-
This should keep only 1 rows per distinct combination considering 3 columns.

M2DOC how to customize Table

I implemented my owned service that returm MTable to insert a table in my doc.
Someone have examples on how to merge cells ?
I would like, for example, a table with 2 columns. The first column composed of only one cell, and the second column composed of 3 cells.
Thanks
For the moment this is not supported by M2Doc.

Multi row dependent dropdown

I'm currently working on adding a dependent drop down to a spreadsheet I'm working on. I've used this formula to create a working dependent drop down on one row...
=if(J9=Operators!B1,indirect("Operator"),if(J9=Operators!C1,indirect("Livery")))
....but I wish for this to be replicated in each row down to J65. I've played around with my formula to no avail and have also made use of an array/transpose formula which I found via a google search but this only creates an error message asking me to add 700 more columns
you will need arrayformula like this:
=ARRAYFORMULA(IFERROR(IF(J9:J65="Livery",
TRANSPOSE(FILTER(Operators!B2:B, Operators!B2:B<>"")), IF(J9:J65="Operator",
TRANSPOSE(FILTER(Operators!C2:C, Operators!C2:C<>"")), ))))
which will generate the items for dropdown and then you need to create a dropdown per each cell in L column
spreadsheet demo for first 3 dropdowns in L column

Comparing arrays using IF - How to get rid of empty spaces in final result?

I have 2 columns in Sheet 1 (named Projects), "Projects" in column A and "Status" in column B. The number of rows is dynamic.
In Sheet 2, I want to extract the projects that meet a certain string criteria and populate a table. For example, if the Status is "Operating", take the project name in column A for that row and put it in a table.
I tried =IF(Projects!B1:B="Operating",Projects!A1:A,"") but it returns the names of the projects in the same row position as in Sheet 1. So if there is a 2 row gap in Sheet 1 between two operating projects, it keeps the 2 row gap in Sheet 2.
How do I get rid of the gaps?
There are some ways to accomplish this.
First solution - based on code you have provided
Your code: =IF(Projects!B1:B="Operating",Projects!A1:A,"")
After some tweaks (working):
=FILTER(
ArrayFormula(IF(Projects!B1:B="Operating",Projects!A1:A,"")),
ArrayFormula(IF(Projects!B1:B="Operating",Projects!A1:A,""))<>""
)
As a bonus - you need this code only in one cell
Picture:
Second solution (elegant and fast one)
You need only this:
=QUERY(Projects!A1:B,"select A where B='Operating'")
Picture