Bloomberg Terminal Screener for HQ Location with Revenue Sort - business-intelligence

How do I build a screener for the Bloomberg Terminal that let's me identify a list of headquarters by state and sort by revenue?

Use either EQS GO or PSCR GO function. Then just select specific headquarters you're interested in within the criteria section and sort by revenue. If you use private companies as well (PSCR) the revenue detail will be less clear.

Related

Can you remove drill through filter from measures in Power BI?

I am trying to use the drill through filter to take my user to other data related to that date. Essentially I have an overview page and I want the user to click on a date and drill through to the next page, where it will show them test scores nearest to that date.
I think I need to do two things 1) store the filter date as a variable so I can use it to find the nearest test date to the filtered date 2) create measures which ignore the filtered drill through date and can for example calculate the minimum or maximum test scores on all the tests overall.
I'm not sure if either of these options are possible but any help is greatly appreciated. TIA

Swapping rows and columns in a matrix in Power BI

I want to analyse the sales of a certain company in Power Bi. I have a customer dataset with nine columns (gender, city, age range, hair colour etc.) and one million records. Now I want to put those columns in a matrix. For instance:
Rows: Gender
Columns: Age Range (<16, 17-20, 21-25 etc.)
Values: Number of Sales
I present this dashboard towards some people and I want to 'play' with the data. What happens if I change the rows to 'hair colour' for instance. Is there a way to do this without using bookmarks? In one sentence: swapping rows and columns of a matrix while you present the dashboard and cannot use the option 'Fields'? Or at least point me in the right direction? It would really help me. Thanks in advance!
Unfortunately, the quickest way to do this is using the Fields pane. The only other option that is available would be Bookmarks, but I guess you have already tried that. I guess you are an option similar to the one available in "Pivot Charts" where you can "Switch Rows/Columns" with the click of a button. That option is not available in Power BI at this point, as far as I know.

DAX COUNT/COUNTA functions

I've looked at many threads regarding COUNT and COUNTA, but I can't seem to figure out how to use it correctly.
I am new to DAX and am learning my way around. I have attempted to look this up and have gotten a little ways to where I need to be but not exactly. I think I am confused about how to apply a filter.
Here's the situation:
Four separate queries used to generate the data in the report; but only need to use two for the DAX function (Products and Display).
I have three columns I need to filter by, as follows:
Customer (Display or Products query; can do either)
Brand (Products query)
Location (Display query)
I want to count the columns based on if the data is unique.
Here's an example:
Customer: Big Box Buy;
Item: Lego Big Blocks;
Brand: Lego;
Location: Toys;
BREAK
Customer: Big Box Buy;
Item: Lego Star Wars;
Brand: Lego;
Location: Toys;
BREAK
Customer: Big Box Buy;
Item: Surface Pro;
Brand: Microsoft;
Location: Electronics;
BREAK
Customer: Little Shop on the Corner;
Item: Red Bicycle;
Brand: Trek;
Location: Racks;
In this example, no matter the fact that the items are different, we want to look at just the customer, the brand, and the location. We see in the first two records, the customer is "Big Box Buy" and the brand is "Lego" and the location is "Toys". This appears twice, but I want to count it distinct as "1". The next "Big Box Buy" store has the brand "Microsoft" and the location is "Electronics". It appears once and only once, and thus the distinct count is "1" anyway. This means that there are two separate entries for "Big Box Buy", both with a count of 1. And lastly there is "Little Shop on the Corner" which appears just once and is counted just once.
The "skeleton" of the code I have is basically just to see if I can get a count to work at all, which I can. It's the FILTER that I think is the problem (not used in the below example) judging by other threads I've read.
TotalDisplays = CALCULATE(COUNTA(products[Brand]))
Obviously I can't just count the amount of times a brand appears as that would give me duplicates. I need it unique based on if the following conditions are met:
Customer must be the same
Brand must be the same
Location must be the same
If so, we distinctly count it as one.
I know I ranted a bit and may seem to have gone in circles, but I was trying to figure out how to explain it. Please let me know if I need to edit this post or post clarification.
Many thanks in advance as I go through my journey with DAX!
I believe I have the answer. I used a NATURALINNERJOIN in DAX to create a new, merged table since I needed to reference all values in the same query (couldn't figure out how to do it otherwise). I also created an "unique identity" calculated column that combined data from multiple rows, but was hidden behind the scenes (not actually displayed on the report) so I could then take a measure of the unique values that way.
TotalDisplays = COUNTROWS(DISTINCT('GD-DP-Merge'[DisplayCountCalcCol]))
My calculated column is as follows:
DisplayCountCalcCol = 'GD-DP-Merge'[CustID] & 'GD-DP-Merge'[Brand] & 'GD-DP-Merge'[Location] & 'GD-DP-Merge'[Order#]
So the measure TotalDisplays now reports back the distinct count of rows based on the unique value of the customer ID, the brand, and the location of the item. I also threw in an order number just in case.
Thanks!
I am semi new to DAX and was struggling with Count and CountA formula, you post has helped me with answers. I would like to add the solution which i got for my query: Wanted count for Right Time start Achieved hence if anyone is looking for this kind of answer use below, filter will be selecting the table and adding string which you want to
RTSA:=calculate(COUNTA([RTS]),VEO_Daily_Services[RTS]="RTSA")

OBIEE 11g Sort Pivot Prompt

I have created a query that selects user base data from two different weeks, uses a MSUM to work out the difference between the two weeks and then create a projection of base size across different verticals based on the net change.
This requires the use of a pivot table with prompts to display just the data from the most recent financial week (in format YYYY-MM), however, every time a new week rolls around, it resets the ordering in the pivot prompt to show the least recent week, which makes the calculations redundant.
I can't re-order the weeks in the base data, as the MSUM calc requires a specific order to be used across multiple dimensions.
Whilst this is very easily fixed by the end user each time by changing the drop down, or by the support team by editing the pivot table and changing the prompt before saving, (which then persists until the next week), it is either going to be a poor customer experience, or extra work for the support group.
Is there a method that I'm missing to create a sort on the pivot prompt options from within the pivot table options?
The equation follows this kind of logic...
"Metrics"."Base Size" + (
(
(
"Metrics"."Base Size" - (
MSUM ("Metrics"."Base Size", 2) - "Metrics"."Base Size"
)
) / [days in time period]
) * 365
)
OBI will order the data as defined by the sort order in the RPD, but ascending is probably the best choice for it at that level.
In your case you could put the Analysis on a dashboard and use a dashboard prompt instead. For that you have the ability, in the options, to change the "Choice List Options" to SQL Results. This should put in a default query, to which you could add an ORDER BY clause. You can also set that to default to the most recent/current period no matter the sort order of the column.
SELECT "Date"."Financial Week"
FROM "My Subject Area"
ORDER BY "Date"."Financial Week" DESC
Instead of using the MSUM() function, you may also be better to use one of the built in time-series functions that can get the value of a previous period for you, without having to rely on any ordering. Have a look into the Ago() function to get the previous period.

Efficient way to query

My app has a class that saves picture that users upload. Each object in the class has a city property that holds the name of the city that the picture was taken at, and a like property that tracks the number of likes.
I want to be able to send a query that returns one picture per city and each picture should have the highest ranking of likes in the city it belongs to. How can I do that?
One way which I first thought about is doing multiple queries by fetching the most liked picture of a city and save it in an array, and then do the same to other cities.
However, each country has more than one city, thus it's not that efficient.
Parse doesn't support the ordinary operations used in databases. Besides, I tried to use a compound query. Unfortunately, I can't set limit or ordering on the subqueries. Any good solution for this?
It would be easy using group by. Unfortunately, Parse does not support "select distinct" or "group by" features.
As you've suggested you need to fetch for each country all the cities, and for each one get the top most rated photo.
BUT, since Parse has strict restrictions on the duration time execution of a request ( 3 sec for an event listener, 7 sec for a custom function ), I suggest you to do this in a background job, saving in a new table the top rated photo for each city. In this way you can easily query the db from client. The Background jobs can be executed up to 15 minuted before parse drop them, so you could make that kind of queries without timeouts.
Hope it helps

Resources