PATH Formula not available - path

I'm trying to replicate the example at the bottom of this page: https://learn.microsoft.com/en-us/dax/path-function-dax where the PATH function returns a hierarchy of employees and who they report to.
When I go to create the calculated column and enter the DAX formula, the PATH function doesn't seem to be available when I start typing it out.
Copying the formula directly and adjusting the field names doesn't work either. It returns the following error: Expression.Error: The name 'PATH' wasn't recognized. Make sure it's spelled correctly.
The data I'm using is just loaded directly from an Excel sheet so I don't think it's an issue with DirectQuery?

Related

Trying to make comparison between different sheets of data in Google sheets using column pair values

I am trying to get to the point where my Google sheet is going to show up like the picture below.
Basically I am trying to find the common column in different table (sheet) and also make sure the type of the columns matches too. The columns are unsorted and won't be of equal length.
But I am unable to do so using vlookup or query which is becoming to complicated. I am attaching the link for the Google sheet.
https://docs.google.com/spreadsheets/d/1yk5J_R74yvYTOmOr5LHgMuLD--xT68pOaps8XvhOgy8/edit#gid=0
Try below formula-
=IFERROR(MAP(C7:C13,D7:D13, LAMBDA(x,y,IF(XLOOKUP(x,A7:A10,B7:B10)=y,"Match","Mismatch in Type"))),"No Match")
This should also work.
=INDEX(IFNA(XLOOKUP(--(VLOOKUP(C7:C13,A7:B10,2,0)=D7:D13),{0,1},{"Type Mismatch","Match"}),"No Match"))
This will spill results automatically. No need drag down.
Update: Use below formula as dynamic input range from source and target sheet without helper QUERY function.
=MAP(Target!A2:INDEX(Target!A2:A,COUNTA(Target!A2:A)),
LAMBDA(x,IFNA(XLOOKUP(XLOOKUP(x,Source!A2:A,Source!B2:B)=XLOOKUP(x,Target!A2:A,Target!B2:B),
{TRUE,FALSE},{"Match","Type Mismatch"}),"No MAtch")))
I think you have a typo in your Source table (you have 'emd_id' where you meant 'emp_id'). If you correct that, you can delete everything in F7 downwards and try the following in F7:
=arrayformula(ifna(if(sign(match(C7:C13,A7:A10,0))=ifna(sign(match(C7:C13&D7:D13,A7:A10&B7:B10,0))),"Match","Mismatch in type"),"No match"))
We are creating two arrays corresponding to whether the 'column' or 'column' AND 'type' entries match in both Source and Target, then using IF/IFNA to assign the required results based on whether the overall result was TRUE/FALSE/#N/A.
EDIT: To make the formula dynamic (as per the comment):
=arrayformula(lambda(source,target,
ifna(if(sign(match(index(target,,1),index(source,,1),0))=ifna(sign(match(index(Target,,1)&index(Target,,2),index(source,,1)&index(source,,2),0))),"Match","Mismatch in type"),"No match"))(
Source!A2:index(Source!B2:B,counta(Source!B2:B)),
Target!A2:index(Target!B2:B,counta(Target!B2:B))))

Trying to index match information from 1 google sheet to another

I have the following 2 google sheets
TEST 1
https://docs.google.com/spreadsheets/d/1mAssNMTGXcMcuYhjDWq6lNfWOdgUfI6FbGSWushGAMg/edit?usp=sharing
TEST 2
https://docs.google.com/spreadsheets/d/15PAI8nnTzp1wQuvvkHxZ81kkeRrqHrvUH1vXiF9tya0/edit?usp=sharing
In Test 2 in cells B36,B37 and C36,C37 I am trying to grab information from TEST 1 to TEST 2
I have checked and checked and triple checked but I am not sure why it is not grabbing the information over.
Previously I had used "-" and "( )" in the table names so I decided to remove all of those and use only letters but it is still not working.
I also noticed that it was grabbing from the correct column (in my original google sheet), column D but it was grabbing the wrong information.
But I checked the name I was using to match "Room BS Harvest" and made sure it matched in both google sheets but still was not able to get it to work.
I have turned on show formula so you can see that I have formulas in Test 2 B36,B37,C36,C37
If you have any idea why it is not working please do let me know. I can't figure out why it is not getting the data over.
I myself would not approach things the way you are doing in this sheet. (I always recommend using a separate sheet within your destination spreadsheet where IMPORTRANGE brings in all of the data from the source location, and then using that single sheet in the destination spreadsheet as the reference for all other formulas, such as the ones you're trying to use.)
In addition, your sheets are inaccessible (i.e., "Comment only"). So neither I nor anyone else would be able to setup an alternative method for you to consider.
That said, and working with what you do have, here is how you might adjust the B36 formula...
Here is the formula you originally wrote (and which is not working):
=INDEX(importrange("https://docs.google.com/spreadsheets/d/1mAssNMTGXcMcuYhjDWq6lNfWOdgUfI6FbGSWushGAMg/edit#gid=0",$J$1&"!A4:H26"),MATCH($A36,index(importrange("https://docs.google.com/spreadsheets/d/1mAssNMTGXcMcuYhjDWq6lNfWOdgUfI6FbGSWushGAMg/edit#gid=0",$J$1&"!A4:A26"))),match($J$2,index(importrange("https://docs.google.com/spreadsheets/d/1mAssNMTGXcMcuYhjDWq6lNfWOdgUfI6FbGSWushGAMg/edit#gid=0",$J$1&"!A4:H4"))))
Here is my edit to that formula structure (which should work):
=INDEX(IMPORTRANGE("1mAssNMTGXcMcuYhjDWq6lNfWOdgUfI6FbGSWushGAMg",$J$1&"!A4:H26"),MATCH($A36,IMPORTRANGE("1mAssNMTGXcMcuYhjDWq6lNfWOdgUfI6FbGSWushGAMg",$J$1&"!A4:A26"),0),MATCH($J$2,index(IMPORTRANGE("1mAssNMTGXcMcuYhjDWq6lNfWOdgUfI6FbGSWushGAMg",$J$1&"!A4:H4")),0))
Notice that you only need the spreadsheets ID number for IMPORTRANGE, not the entire URL. This just makes reading such formulas easier.
You also had mismatched sets of parentheses. This was your biggest issue.
And I recommend using the third parameter of MATCH to indicate what kind of match you're looking for. (Here, I assigned 0, which means "exact match only.")
Hopefully, you can use that as a model for editing your other formulas.

How do you alphabetize based on dates, and put most recent at the top?

Sample Sheet
How do you reference the Data Import tab and display everything in order of most recent date at the top within the Worksheet, and alphabetize the Vendor Name (column C - Worksheet)?
I have tried the SORT function but little to no luck as it just alphabetized everything in order even when referencing the Import Date from the Data Import.
For visual reference
FIGURE 1:
FIGURE 2: Expected Outcome
To further elaborate:
This one might be tricky, but Column B will be hyperlinks and also needs to be in the correct order that also belongs to its proper data brethren. This is what I currently have and just references everything in order of new data incoming.
(=ARRAYFORMULA(IF('Data Import' !A:A<>"", HYPERLINK("Some_Website" & 'Data Import'!A4:A&, 'Data Import'!A3:A), ""))
This one I'm guessing will not only need to reference the date, but the naming order as well.
Okay. So this was resolved with the query function.
Source info: https://support.google.com/docs/answer/3093343?hl=en
The sample sheet will remain open to those who are in need of knowing how to use it and can view how it was used.
Doing this resulted in the expected outcome. However, there is an issue.
If you have other columns you intend to put manual data entry, this entry data will remain stagnant and will not move.
Only the columns with the query formula will be dynamic and will keep getting pushed downward while your stagnant entries will remain right where they are.
I'm currently looking into Assigned Index Numbers to resolved this.
Solving the Dynamic / Static Data Alignment challenge using Alignment Index Numbers

Google removing original formula on #REF! error

I have found that any time a #REF! error exists, google sheets permanently replaces the incorrect reference in the formula to #REF!. Even if it was just a typo where one letter was off and all that it would have taken to fix it was to delete that extra character.. huge time waster, and also has made me lose quite a bit of work when I can't remember which reference went where in a complicated formula.
Anyone know of a fix?
Even though formulas display the name, Named Ranges used in formulas actually refer to the Named Range objects and not the names themselves. When you delete a named range you are deleting the object that the formula refers to. Creating a new named range with the same name is not the same object used in the formula. To change the range that the Named Range refers to one should modify the Named Range object instead of deleting it and creating a new one.
setRange(range)
Sets/updates the range for this named range.
https://developers.google.com/apps-script/reference/spreadsheet/named-range#setrangerange
The reference being replaced is by design. a suggestion has been submitted to Google to only put #REF! As the outputted value, instead of modifying the existing formula.

Fusion Layer not showing data when querying against a text column

https://gist.github.com/2017706
The HTML file at the gist above will successfully load the data from the referenced fusion table into a map layer, yet when I try to query against the Name column (yes I know columns are case-sensitive in queries) I get the "Data may still be loading" error displayed, yet clearing the input box to reset the layer without a query works again.
I got this to work with a small fusion table created manually, the only difference with this data is that it was imported from an Excel file. Is there anything I'm missing?
I believe the problem falls at the following line:
select: 'Latitude,Longitude',
In a table with a 2-column location, you only need to select the one column that was marked as a Location. In this case, it appears to be your Latitude column. Try updating the above line to the following, and see if that works:
select: 'Latitude',

Resources