I have been having trouble creating a rankx function that ranks locations([markets]) based on certain metrics by period (year & quarter). My data includes both past dates with historical data and future dates with projected data for each market. I would ideally like to be able to change the period and see the ranking of each market in relation to all of the other markets (all markets as opposed to just the markets selected in the slicer).
My current measure formula is:
GSVacancy Rank =
CALCULATE(
RANKX(ALL('GreenStreet-Data-2022-08-30'[Market]),[Measure - CoStar Vacancy],,ASC,Dense),
ALL('GreenStreet-Data-2022-08-30'),
VALUES('GreenStreet-Data-2022-08-30'[Market]))
Measure - CoStar Vacancy =
CALCULATE(
SUM('GreenStreet-Data-2022-08-30'[CostarVacancy]),'GreenStreet-Data-2022-08-30'[Scenario]="Baseline")
Which does not accurately rank the markets, nor does the ranking start at 1.
The resulting report is below:
enter image description here
Related
Im fairly new to Quicksight and need help with the following:
I want to calculate the average sales in $ per month for each of my clients (Monthly Average by Client) and then categorize those clients in "A","B","C" categories where A > 250,000 monthly purchases, 100,000 < B <=250,000 and C <= 100,000.
The table I have is very similar to the following:
I tried using the following function:
avgOver(
sum(values_movement),
[contact,extract('MM',fecha)])
This function allows me to do the average but wont allow me to visualize it without selecting the month, given that I want to categorize the each client by their total monthly average, I cannot do a categorization based on a function that wont generate the client monthly average without selecting the month.
I know that once I get this function correct I can use ifelse() in order to categorize each client based on their monthly average transactions
Is there a way to make a metric in Quicksight that is the ratio between TOP10 offices by REVENUE divided by REVENUE.
Thanks
The problem is that if I apply a filter to select the TOP10 offices by revenue in the numerator, the same filter is the apply to the denominator.
It was not clear from your question exactly what you meant by "ratio between TOP10 offices by REVENUE divided by REVENUE" but I have assumed you wanted the TOP N real total revenue by Store alongside the "ratio" or percent of total revenue of ALL revenue, not just the TOP N stores revenue.
To do this you can use the following calculated fields.
Make a calculated filler field to 'partition' by; that is you can use it to make a single partition of the whole data set, e.g. "single_partition_filler":
ifelse(isNotNull(store),1,0)
Make the ratio calculation you want, "Revenue over Total Revenue". The trick here is to use the "PRE_FILTER" aggregation level in the Table calculations so you are getting the sum of revenue by store PRE_FILTER divided by the sum of revenue by all stores (using the filler column) PRE_FILTER:
sumOver(revenue,[store],PRE_FILTER) / sumOver(revenue, [{single_partition_filler}], PRE_FILTER)
Make a table with "Store","Revenue (Sum)" and "Revenue over Total Revenue (Min)" and using a TOP N Filter for Store by Revenue (Sum). See Quicksight example below:
Compare with the same table unfiltered below:
Dataset used:
store,revenue
A,100
B,50
C,40
D,70
E,60
A,35
C,80
I am new to Power BI and trying to create a simple card with percentages that will change when I select each category on my slicer. I need the nominator AND denominator to change with each filter - trying to achieve the '% of column total' function in Excel, but on this visual. This is a measure I created to calculate % of leavers over active, but it is not dynamic.
CALCULATE(COUNTA('Leaver'[ID]), /counta('Active'[ID])
My slicer has 3 regions: Central, Southern, Eastern. When filtered by Central, I need the card to show count of leavers from Central region out of total population in Central region. Currently the filter is working but the denominator pool is constant.
Say I have an index of product sales where each document is an individual sale for a specific product. I can use Kibana to chart a date histogram of sales counts, bucketing by every month. This would be the frequency of product sales every month. Here is an example:
Sales per Month
I can also split that series using a terms aggregation on the product name, so I end up with the distribution of those sales across each product each month like so:
Sales across Products per Month
What I can't do, which seems straightforward, is sort that distribution by the product count in that specific month. I can sort it alphabetically, or by the overall sales of that product, but I can't do it using the sales during that month. This means that if the most popular product overall is at the bottom of the bar (like the green product in the above image), it remains at the bottom always even if the sales count of that product for a particular month is lower than everything else.
Is it possible to order this series by the product count in each month? In general, is there a way to order a split series by the value of each 'split'?
I have been using the Query object for some time and I can not find how to show the percentage of a value over the total of the row.
On this Genexus Query Usage Example, it shows totals by Continent, Country and Attraction.
How this query must be configured to show the attractions percentage over row totals to get a result like this:
Those numbers in the image you posted come from a QueryViewer example. They represent the total sales of Soy, Wheat and Rice per Continent and Country. There are three different measures in this query, and you cannot make calculations among measures in the QueryViewer, so you can't achieve what you want with these numbers.
But you can modify or make your query so that there is only one measure, let's say "Sales amount", and the Crop can be one dimension:
Dimensions: Continent, Country and Crop
Measures: Sales amount
Once the data is presented like this, the percentage will show exactly what you want.
PS: By "dimension" I mean attributes without aggregation and by "measure" I mean those attributes that have any aggregation function (Sum, Average, etc.)