What standard is the currency parameter - get

When I wanted to get the median price of an item on the steam market I came across this answer. It gets the lowest and median price of an item. The one thing I had trouble understanding which currency number corresponds with what currency and if so, which industry standard is used here.
This is an example URL:
https://steamcommunity.com/market/priceoverview/?appid=730&currency=3&market_hash_name=Tec-9%20%7C%20VariCamo%20(Minimal%20Wear)
In the documentation it says it is ISO 4217:
An optional ISO 4217 currency code. If specified, only prices for this currency need to be
But that's clearly not the case.
When I put in 1 as the currency parameter, I get dollar.
With 2 I get pounds.
And with 3 it responds with euro.
...
The max seems to be 41 with the Uruguayan Peso

All actual currency codes and other respective information about currencies on Steam can be found in global.js on https://steamcommunity.com/market/. Just open this page. Then open developer console and search for g_rgCurrencyData variable like on image below.
Location of g_rgCurrencyData variable
Besides codes there are info about formatting for each currency which is useful when you need to parse data from page or automate some actions.

Related

setting min and max price from API variable in function

I have an API web http://www.boredapi.com/api/activity/ which randomly creates an activity to do if you are bored. The common output is the activity with the followings fields: key,link,participants,accessibility,price and type.
I'm only interested in showing the activity, the type and the price.
So far so good.
BUT, I wan to be able to get only the activities that are WITHIN a range of prices.
I created the function "fun" and has two parameters (the minimum price and the maximum we are willing to pay.
I want to check in a range from 0 to 10 which activities are available in a specific range of price.
The only thing I can't get around is how to tell the API to print only if the activities are in these ranges...
I tried to access the attribute with ['price'] but it doesn't seem to make any difference.
How would you address this issue?
Currently the output is something like this, the only issue is the price range
import requests
import json
def fun(minprice,maxprice):
for i in range(0,10):
response= requests.get("http://www.boredapi.com/api/activity/")
content_dict=json.loads(response.content)
del(content_dict['key'])
del(content_dict['link'])
del(content_dict['participants'])
del(content_dict['accessibility'])
minprice=content_dict['price']
maxprice=content_dict['price']
print(content_dict)
fun(0,0.1)
Hello from what I understand you are trying to go though each option and check if the price is between two values you can do this by check if the price is between your values like this assuming that content_dict['price'] is a float
if content_dict['price'] > minprice and content_dict['price'] < maxprice:
# whatever you want

Add x Days to a Date Based on vlookup Output Excel

What I'm trying to do is give a due date based on an input date, type of review, and department.
For example if the department is ABC and the review is retrospective, the due date will be the input date + 30 days.
But if the department is ABC and the review is concurrent, then the due date will be input date + 1 day.
I know I can concatenate the department and review into the vlookup table but I'm not so sure how to get the output to be the due date that I want.
Can anyone help?
EDIT:
Per the first answer below, I hashed out an input table with concatenated columns just in case I needed them. It is a bit more complicated than I originally thought.
Input table with date logic
I'd love to simply edit the source data but the report isn't readily available in the database. Could I still use the suggestions below?
Assuming you have a lookup table for the number of days to add depending upon the department and review type similar to the one below, you can use an INDEX/MATCH/MATCH and simply add it to the input date:
=$A2+INDEX($H$4:$J$5,MATCH($B2,$G$4:$G$5,0),MATCH($C2,$H$3:$J$3,0))
SOLUTION FOR AN ALTERNATIVE LOOKUP TABLE LAYOUT
If your layout table is more like as below, you can use a MINIFS formula (or MAXIFS if you would prefer):
=$A2+MINIFS($I$3:$I$8,$G$3:$G$8,$B2,$H$3:$H$8,$C2)

What is the meaning of “StandardProductID” (ASIN and EAN)

I have that answer here "What is the meaning of "StandardProductID" (ASIN) in Amazon Seller inventory?" but I want to know how to use them together (EAN and ASIN)?
<StandardProductID>
<Type>ASIN</Type>
<Value>B000LQLG7E</Value>
</StandardProductID>
<StandardProductID>
<Type>EAN</Type>
<Value>9006900212131</Value>
</StandardProductID>
This is an example for ASIN and for EAN.
Thanks!
Amazon has different product identifiers according to different international standards. You usually should not try to use both of them together as you're asking, instead the normal procedure is to use one of them and Amazon should be able to get the rest.
As the answer you linked says: Uou should use the ASIN if you have it, otherwise one of the other standards.
To know what each of those mean, have a look at this answer in Amazon help: What are UPCs, EANs, ISBNs and ASINs?
What are UPCs, EANs, ISBNs. and ASINs?
UPC Universal Product Code (UPC) is a 12-digit bar code used
extensively for retail packaging in United States.
EAN The European Article Number (EAN) is a barcode standard, a 12- or
13-digit product identification code. Each EAN uniquely identifies
the product, manufacturer, and its attributes; typically, the EAN is
printed on a product label or packaging as a bar code. We require EAN
codes to improve quality of search results and the quality of the
catalog as a whole. You can obtain EANs from the manufacturer. If your
products do not have manufacturer EANs, and you need to buy EAN codes,
you; should go directly to GS1 UK http://www.gs1uk.org
For example, the EAN of "Colgate Total 75 ml" is 4011200296908
ISBN The International Standard Book Number (ISBN) is a unique
commercial book identifier barcode. Each ISBN code identifies uniquely
a book. ISBN have either 10 or 13 digits. All ISBN assigned after 1
Jan 2007 have 13 digits. Typically, the ISBN is printed on the back
cover of the book.
For example, the ISBN code for J.K.Rowling's "Harry Potter and the
Deathly Hallows", Adult Edition, Paperback, UK edition is
978-0747595823, and this code identifies uniquely this book and
edition.
ASINs
Amazon Standard Identification Numbers (ASINs) are unique blocks of 10
letters and/or numbers that identify items. You can find the ASIN on
the item's product information page at Amazon.com. For books, the ASIN
is the same as the ISBN number, but for all other products a new ASIN
is created when the item is uploaded to our catalogue. You will find
an item's ASIN on the product detail page alongside further details
relating to the item, which may include information such as size,
number of pages (if it's a book) or number of discs (if it's a CD).
ASINs can be used to search for items in our catalogue. If you know
the ASIN or ISBN of the item you are looking for, simply type it into
the search box (which can be found near the top of most pages), hit
the "Go" button and, if the item is listed in our catalogue, it will
appear in your search results.
For example, the ASIN for Hasbro's "Monopoly" game is B00005N5PF.
For more information you can read about each standard separately:
UPC
EAN (now renamed to IAN - "european" changed for "international")
ISBN
ASIN

Excel budget w/CC input data

I am attempting to make a budget calculator and want to import my CC data to compare my actual spending w/estimated spending based on different categories. Briefly, (see attached screen shot), I have the input from my credit card which has location specific data, I have another column with a refined transaction type, and a third and final column with the associated spending category.
I can not figure out how to use the raw transaction data to search for the refined transaction type and associated spending category.
=VLOOKUP(FIND(C2&"*",Sheet3!A:A,1),A1:B10,2,TRUE)
Problem Example
First of all, the FIND function returns a number, which then becomes a parameter for VLOOKUP. This won't get you the results you're expecting. It'll search for a number.
This is going to be complex but here's a start, for EXACTLY the data you've provided.
=VLOOKUP(LEFT(C2,FIND("#",SUBSTITUTE(C2," ","#",(LEN(C2)-LEN(SUBSTITUTE(C2," ","")))/LEN(" ")))-1),A:B,2,0)
Drop that into cell D2. Have fun.

Cognos frame work manager: format numeric column to show currency dynamically

In this url, it is shown how you can format a particular column to according to particular currency.
http://publib.boulder.ibm.com/infocenter/caapps/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_fm.10.1.0.doc%2Fug_fm_id13919format_SAP_query_items.html
Now in a result set, there may be 2 rows and each may be of a different currency and also different number of decimals. According to the method here, it seems that we need to hard code the currency and the number of decimals on the entire column. Is there a way to set it dynamically?
I have two columns in the result set, one is the amount the other one is the currency. Based on currency, i want to format the amount column. From db, the amount column just comes back as a number.
How can I do it?
I can't think how this would be done in Framework Manager. You can do it in Report Studio however.
He are some high level instructions on how to do it in Report Studio:
In Condition Explorer, create a variable which results in a different string for each currency. For example if your currency code field is [Table].[CurrencyCode] and it has things like 'AUD','CAD' etc. in it then your variable expression would just be the field:
[Table].[CurrencyCode]
This will simply output the currency as its result
Still in the variable creation screen, add values the the 'Value' window to for each possible currency code result
Go to the report page, click on the field that contains your actual currency value (i.e. 13.50 and set it's Style Variable property to the variable that you just created
Now go back to condition explorer and select your first currency
Ensure your currency value field is selected and edit the 'Data Format' field to the appropriate format
Repeat 4 & 5 for each currency
Here is another guide to how to do this:
http://www-01.ibm.com/support/docview.wss?uid=swg21339405
This is called 'Conditional Formatting' if you would like to research it further.
Unfortunately this solution needs to be done at the report level and can't be done down at the the FM level. I'm not aware of a way that you can conditionally set the data format in FM like this.

Resources