Tableau - Find median of top 10 in a category - tableau-desktop

Based on my data, I want to find the median PRICE of top 10 IDs basis the ENR value in every county. In the attached file
I have already found the top 10 IDs basis the ENR value but cannot figure out how to find the median of these top 10 PRICE values in a county.
Any help is appreciated.
Thanks.

Related

Want to show the average number in Tableau

I have a line chart in Tableau showing sales over time and I have shown the average sales over time using the "Analytics" tab "average line" feature. I would like for the number to show up with the average line. For example, if the average is 800 sales over time, I would like for the number 800 to appear next to the line. Right now the line only says average with no number. Does anyone know a solution? Thanks in advance.
As described in the guide (look at this page) you can show the value by using the label field in the menu.
Is this your target?

How to format the first X rows based on sort order?

I have a google sheet that calculates a score for each row based on numeric values in the different columns. I then sort it by the calculated score, high to low. Now I want to conditionally format (bold) the first X rows in the sheet based on that sort order.
Does anyone have any suggestions on how to achieve that? I've been googling for hours now, but no joy.
Thanks!
It should be something like this:
=rows(A$1:A1)<=10
for first 10 rows

Max Score then Offset Left one column

I am trying to find the max score and then offset left to find the name of the person that scored. However, the link below only allows for one column and one row at a time.
https://www.mrexcel.com/forum/excel-questions/472213-offset-formula-using-max-determine-reference-cell-location.html
This is not what I need. I need to have an equation that allows me to find the max score and then offset that to the left by one and take the name. I will need it for multiple columns and rows in the same equation that can be easy to read. I have come across equations like this.
ADDRESS(MAX((A154:H174=MAX(A154:H174))*ROW(154:174)),MAX((A154:H174)*COLUMN(A:H)))
Sorry for not having a picture I don't have enough reputation. It was a screenshot of my spreadsheet. Thanks for any help that you can provide.
I am open to suggestions and edits on this post. I do desire to improve and use this more often.
Try this, assuming your data is names in A1:A9 and the score in B1:B9
=INDEX(A1:A9,MATCH(MAX(B1:B9),B1:B9,0))

histogram not showing properly in jupyter

hope you can help me with a minor problem in jupyter.
I have a big dataset about people that have bought newspapers and i want to show it in a histogram. the dataset is kinda big with 68000 row and 1 columns. the histogram is giving me all the row values in the x-axis, which i just want to be between 100 and 1200. Because the lowest paper that got sold in a month was 1 and highest 1188. i want to group that so my x axis shows 100-200-300-400-500 and so on till 1200. but its showing all wrong, instead its showing my rows witch goes from 1-68000.
plt.figure(figsize=(20, 10))
plt.xlabel('day')
plt.ylabel('Frequency')
plt.title('subscription_days')
x = df[['subscription_days']]
plt.hist(x)
plt.grid(True)
plt.show()
enter image description here

Change color of cell if sum of row drops below 2

I'm working on a sheet to help me keep track of inventory at a bookstore. Here is a watered down version. There are 19 titles in total, kept at three different warehouses. I'm working on a notification system where the top box will turn red if the sum of books in any single title drop to 3, so I know it time to restock.
How can I do that?
NOTE: I can't add another column to get the sum value. The original spreadsheet is pretty crowded as it is.
The full sheet is in the copy of Inventories.
A custom formula in conditional formatting to achieve this:
=ARRAYFORMULA(MIN(SUMIF(IF(COLUMN(C3:E3),ROW(C3:C21)),ROW(C3:C21),C3:E21))<3)

Resources