How to get an external link to update google sheets automatically? - google-app-engine

I have been searching the internet for a while now and i can't really seem to find any answers for my query what i am looking for is this...
Runescape Grand Exchange Market
For example:~
Runite Bar Is "14,378 coins"
But it changes from time to time depending on the "game economy"
How can i use this number to auto update in google spreadsheet?
For example 1 bar is 14,378 coins. If i choose to put 2 Bars I would like the price of the item to be changed also so it's 28,756 coins.
What i have done at the moment is to make this Runite Bar you require certain items such as:
1. Runite Ore x1
2. Coal x8
I have set the value to auto update when i choose to purchase 100 Runite Ores It will automatically update how much Coal i need which would be "800" but what i want is to auto update the "PRICE" of the BAR
So if I choose to purchase:~
300 Runite Ore (1) - 10,975 - i would like this also to be updated automatically.
2400 Coal (x8)- 2,504 - i would like this also to be updated automatically.
Cost would be: 4,043,700 Coins - This is the total and should be updated automatically.
But if somebody tells me how to get price of an external site i can maybe do the Runite Ore & Coal myself i hope..lol
Runite Bar Website = Runescape Wikipedia - Rune Bar - as you can see it says "Exchange price" THAT is what i want in spreadsheet to be updated automatically.
Best Regards
Antartika

Please try:
=substitute(left(index(importxml("http://runescape.wikia.com/wiki/Rune_bar","//td"),15,1),6),",","")*1
the //td part should import the entire table (the one in the middle of the page). It is XPath code that seems to me not at all well documented but ZVON might help.
index 15,1 then takes the fifteenth row and the first column (ie 14,573 coins) of that table. These are the parameters to change to select other cells from that table.
left strips off the coins part, but since a function that manipulates text results in a string, so the comma is a 'character' rather than formatting feature. However
substitute replaces the , with ""(ie with nothing) so that when we multiply by one (*1) we get a number that we can then multiply again by however many bars are involved.

Related

Issue with slicer Filtering from different data sets/ columns

I am having a problem trying to understand how to accomplish this. I want to use one set of slicers in my Excel spreadsheet to drill down to specific information. The problem is that I have duplicated Model names under the "Intel" worksheet. The reason is that Model Name could have one or two controllers. I have created all the queries, Power Pivots, and relationships. The link to the file is available here (this is all public data) if someone is willing to take a look and provide the guideline.
PROBLEM:
Due to Model Name's duplication under the "intel" worksheet, I have created a "DUP" column to identify duplicates in my data with the "X." I thought if I made a column “RELATED -Devide by 2” in the Power Pivot “Intel” with the formula =IF([DUP]="X," [RELATED - 12 Month Volume]/2, [RELATED - 12 Month Volume])", I would be able to show correct 12Month Volume based on Volume worksheet. This is partially true. I came to an understanding that I need to use both, “RELATED - 12 Month Volume” and “RELATED -Devide by 2” depending on what slicer I am filtering with
If Filtered by FORM Factor or Vendor, I can use RELATED - Divide by 2 (Orange color as shown below).
Now, if I filter above with Controller (like X710-TM4), this is not good. For Controller Filter, I would need to use “RELATED - 12 Month Volume” (Blue color as shown below), which is NOT suitable for above
How do I accomplish this? One set of slicers and be able to drill down and show correct value based on slicer used
enter image description here
Never mind... I figured it out with the CROSSFILTER measure

How can I get text from a cell using the select statement of the query function in Google Sheets?

I try to get some data from tab A to tab B using the query function. This all works fine untill I include some data of tab B into the object in the query function.
The thing is, I want to create a scoring sheet that calculates the constructor points based of the first sheet with the driver standings. So tab A looks something like this:
Peter Wright - Team Fast Racers - 85
Cameron Bright - Team Quickies - 60
Marc Feiner - Team Fast Racers - 20
In this example the number correspond to a total amount of points on the right column.
The second tab needing to calculate the constructor points, looks simply like this:
Team Fast Racers 105
Team Quickies 60
Don't look at the amounts. It is just an example.
Now I want to use the query code where I can ask Google Sheets to grab the constructor name from tab B (i.e. Team Fast Racers) and look it up in tab A to get the score from both drivers and sum it up to get the total. This is the syntax now:
=QUERY({'Driver Standings'!$A$4:$T$32; 'Constructor Standings'!A1:C16}; "SELECT T WHERE C = 'B2'", 1)
The problem is that it does not recognize B2 to get the 'Team Fast Racers' name and search for it in tab A. How can I fix this problem.
Again, 2 drivers are in a team and those scores need to be summed up and displayed in the second tab to get a clean constructor championship standings. How can I get the data from tab A based on searching for a string out of tab B column B.
And if that is all done, I would also like the constructor standings (tab B) to be sorted based on amount of points, without losing the structure of the formulas.
first of all, all ranges in { } needs to be of the same size (at least in one dimension). if you are stacking ranges one under another then amount of columns needs to be the same:
{Sheet1!A:C; Sheet2!A:C}
then when you have a "constructed range" as above, you need to use Col references in QUERY statement
so instead of
"select A,C"
it needs to be
"select Col1,Col3"
then if B2 is a numeric number it will be
"where Col1 = "&B2
but if it is a plain text it will be:
"where Col1 = '"&B2&"'"
UPDATE:
tho all you need is:
=QUERY({'Driver Standings'!C4:C\'Driver Standings'!T4:T};
"select Col1,sum(Col2)
where Col1 is not null
group by Col1
order by sum(Col2) desc
label sum(Col2)''")

Can you create dynamic formulas in Google Sheets?

So I'm just starting out creating a portfolio tracker within Google Sheets. I'm using the Google Finance methods to get the stocks name and all the relevant data that I need. The only issue is that I can't figure out how to populate the specific data I need without having to manually type out the same formula's for each stock I want data for.
For example... Each row in the first column would contain the ticker symbol for that specific stock. If I bought a new stock, I would just type in the ticker symbol in cell A1 and this would populate the necessary fields such as price and so on. If I bought another stock I would essentially do the same thing but now in A2.
I know that you can get the price of a stock by doing
=GOOGLEFINANCE(A1, "price")
but is there any way to make it dynamic? something like:
=GOOGLEFINANCE(A(Row(ref)), "price")?
Any suggestions would be helpful. Maybe there's even an addon that makes this process simpler, but I'm not sure.
try:
=ARRAYFORMULA(IFERROR(GOOGLEFINANCE(A1:A10, "price")))
You just have to write the function for A1:
=GOOGLEFINANCE(A1, "price")
And then drag the little square on the cell down. It will automatically pick up the correspondant number of the row in the A column.
You can set-up your sheet to have like 100 rows used, and when you add the ticker it will automatically calculate it.
If you don't want th #N/A to show you can do it like:
=IFERROR(GOOGLEFINANCE(A1, "price"))

Google Data Studio piechart from column with multiple values per cell

I have an excel spreadsheet from a Questionnaire. One of the questions was in checkbox format. The result of this question are held in a single column, and where the user has selected more that one answer, the answers are separated by comma's.
What devices do you own? Mobile, PC, Laptop, Tablet
So in a single cell I get 'Mobile,PC' when these two are selected.
I am using Google Data Studio to visualise the data, but stuck on how to create a graph that shows all the values individually.
At the minute I get a combination for every value. So a value of 1 for 'Mobile,PC' rather than a value for 1 'PC' and '1'Mobile.
Google Data Studio doesn't allow countif statements, so a bit lost.
I have tried to TRIM, COUNIF and REGEX but none have worked.
Count(REGEXP_MATCH(Device, "PC"))
I'm a bit lost on this, tried so many combinations. If someone can put me on the right track I would be very grateful
I don't think you'll be able to achieve that with a pie chart without changing your data source first as it needs one dimension (Device) and then one count metric which your data doesn't seem to support.
You could create 4 metrics like
SUM(
CASE
WHEN REGEXP_MATCH(Device, "PC") then 1
ELSE 0
END
)
And put them into a Stacked bar / column chart. You might need to create a dimension that has a single value to avoid having multiple bars/columns.

SSRS Conditional Expression

In SSRS report, I want to perform conditional color formatting where highest rank should be Green and lowest rank should be Red within a Regional Manager group as shown below
Note: Couple of options, I was thinking of includes
I am using custom code function, for deriving Min and Max value, and somehow if I can include grouping filter on Regional Manger then it could work, but don't know if that's possible
In dataset, I create extra columns for each column and store Min\max value in it. But less keen towards this option, since I have 24 different ranks and which would mean, I will need 24 different columns along with current 40 attributes
Any help would be appreciated
I know you don't want to do this for each column, but despite your misgivings it is probably the best approach. Based on my previous answer to your earlier related question you can colour the min and max for each group as follows.
Create a table with fields store, atvrank, and btvrank
Right click the row header, and select Add Group -> Row Group - Parent Group, and choose Regional Manager. Set the Group name to RegionalManagerGroup
Then set the background colour for your cells to
=iif(Fields!atvRank.Value = min(Fields!atvRank.Value, "RegionalManagerGroup"),
"Green",
iif(Fields!atvRank.Value = max(Fields!atvRank.Value, "RegionalManagerGroup"),
"Red",
"White"
)
)
This now finds the maximum and minimum within the current group instead of the whole dataset. You will need to set this expression for each field individually, but this is probably less effort than returning new rows from the database to determine the maximum and minimum for each field.
This approach will give the following output
Please seriously consider this solution. If you have further questions, please just ask.

Resources