Scrape specific data from a Deliveroo site - regex

I would like to pull all ingredients that are unavailable (they still visible but in grey: an example with the
on a Deliveroo page.
All ingredients are on a
.
I would like to get a google sheet with all missing items per day.
Does anyone have an idea of how to build that?
The link to the Deliveroo page is:
https://deliveroo.co.uk/menu/london/soho/honi-poke?day=today&postcode=W1T1DE&time=ASAP

=ARRAYFORMULA(REGEXEXTRACT(REGEXREPLACE(QUERY(IMPORTDATA(
"https://deliveroo.co.uk/menu/london/soho/honi-poke?day=today&postcode=W1T1DE&time=ASAP#"),
"select Col1 where Col1 contains'item--unavailable'"),
"\>|\<|\/|\""", ""), "0.1(.*)spanh6"))

Related

IBM Cognos Analytics - Multiple rows into single row

I am using Cognos Analytics 11.0.4 and I am trying to concatenate multiple rows into a single row.
ID Department
123456 Front Office
123456 Reception
123456 IT
What I would like to do:
ID Department
123456 Front Office|Reception|IT
I tried creating a repeater with a new query, adding ID, Department to it, then setting up a master detail relationship between query1 ID and query2 ID, finally adding a text item with the | character.
When running the report I only get the below.
ID
123456
Anyone know what might be going wrong? It is like the repeater and | in query2 are ignored for the final output.
I figured it out, as simple as it was, it took me a while to realise.
Exporting my report with the 'Run Excel Data' option couldn't handle the row operations required by the Repeater object.
Switching to 'Run Excel' resolved the issue.

PowerBI how to combine values from 2 tables into a URL dynamically?

Using some sample data, I have table1 with the following values:
Name
Bob
John
Mary
and table 2 with the following values:
folder
documents
pictures
videos
I need to select one value from each table to build a URL. the final URL would be something like:
"https://example.com/Bob/Documents"
"http://example.com/Mary/Pictures"
The person viewing the report needs to choose a name and a folder, then click on a button to load the url.
I haven't been able to do this yet. I can do a dynamic column and get the name, but can't make it get the folder.
Folder table can be rebuild in another way if it solves the problem. Name table comes from Sharepoint and can't be altered.
thanks
You can create a measure using the below DAX, and if it helps then please consider Accept it as the solution.
Measure 5 =
VAR X = SELECTEDVALUE(Tabl11[Name])
VAR Y = SELECTEDVALUE(Table2[Folder])
RETURN "https://example.com/" & X & "/" & Y

Google Sheets Query > Filter rows based on text in a string

I have a recipe database on Sheet1. Each row is a recipe and each recipe has all of the ingredients listed in a single cell using JOIN in column B e.g. "Bread, Butter, Beans, Cheese".
On Sheet2, I have a client database. Each client has a list of dislikes, all of which are listed in a single cell, using JOIN e.g. "Sprouts, Celery, Fish".
On Sheet3, I would like to have a filtered list of all the recipes that do not contain ingredients that the client dislikes. Using a dropdown, I would like to choose the client and then see what recipes they would like.
After hours of back and forth with Sheets, I've conceded this is way above my pay grade.
Could anyone put an end to this mystery for me?
Here's a link to a demo sheet > Demo Sheet
try:
=FILTER(Sheet1!A2:B, NOT(REGEXMATCH(Sheet1!B2:B,
SUBSTITUTE(VLOOKUP(B1, Sheet2!A:B, 2, 0), ", ", "|"))))

Transpose cell data into separate rows

I wanted to see if there was a formula or something that I could do to get something like this accomplished in Google Sheets.
Table 1 is the input I am getting
Table 2 is the output I want to generate on a separate sheet
I am trying to use output I get from a Google form into a Google sheet and create a CSV to import into Google Groups.
=ARRAYFORMULA(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(IFERROR(SPLIT(B2:B, ","))<>"", "♦"&SPLIT(B2:B, ",")&
REGEXEXTRACT(A2:A, "(#.*)")&"♣"&A2:A, )),,999^99)),,999^99), "♦")), "♣")))

filter with multiple regexmatch?

my spreadsheet link with edit authorized - feel free to test any formula
https://docs.google.com/spreadsheets/d/1iY0p3_mdOfrjtBy9HPskzudf27m1mh_hApecsn0KW4A/edit#gid=1268421551
please look at the country that has statename such as P26-P38
I have 2 sheets - one is main sheet and another is named 'articles'
MAIN SHEET
ARTICLES
MAIN SHEET > on column P > I need to show the maximum date value located in column 'F' [articles!F:F]
from 'articles' sheet by finding any rows on column 'B' of 'articles' [articles!B:B]
that contains the number from column 'M' of 'Main sheet' [main!M:M]
so I use this formula
=IFERROR(MAX(filter(articles!F:F,regexmatch(","&articles!B:B,","&M58&","))))
and its working fine
but then I also need to find state name which is located in 'column E of articles'[articles!E:E]
like in the screenshot above I need to find 'Alberta' for Canada
as you can see the state name will come after '-' and follow by ':'
So it need to match both conditions and return the date
I don't know how can I define it in the formula 'regexmatch' and combine it together with the formula that I already have
I tried this but doesn't work
=IFERROR(MAX(filter(articles!F:F,regexmatch(","&articles!B:B,","&M58&","),articles!E:E,"-"&"
"&K58&":")
anyone please help, thanks
See if this works
=IFERROR(MAX(filter(articles!F:F,regexmatch(articles!B:B&articles!E:E, M59&K58&":"))))
If not, please share a copy of your spreadsheet with editing rights.
EDIT: after seeing the data, try (e.g. in P26)
=IFERROR(MAX(filter(articles!F:F,regexmatch(","&articles!B:B,","&M26&","), regexmatch(articles!E:E,K26))))
Drag up or down as far as needed.