I am trying formula for sorting of a column in excel. Data is entered in one column and sorted data is output in another one. Please see attached excel file.
As you can see due to same data in second column I am getting rank 2 twice and VLOOKUP cannot find entry named 3 so it is giving error. When all data entered are unique there is no problem but in case of duplicated data I am having problem. What can I do?
Kbv.
Just noticed a third possibility that you miight be looking for. So you want to sort the B items where column A indicates the rank of each item in B:
C2
=VLOOKUP(SMALL($A$2:$A$7,ROW(1:1)), $A$2:$B$7, 2,FALSE)
Old answer:
If you want a custom sort where column A indicates the rank of the resulting item inC , copy the following formula in C2 and fill down.
C2
=SMALL(B$2:B$7,A2)
If you want just to copy the column as sorted "naturally", you dont need any helper column, just type this in the first row and fill down (I used column D in my example image below):
D2:
=SMALL(B$2:B$7,ROW(1:1))
Related
I’d like to know how to show the positional change of data in a table based on the row without using a macro. This is a theoretical question so I don’t have a demo file to share.
Imagine a 3 column (A:C) table sorted by C:C which automatically updates when new data is added via a Google Form. Is it possible in a new column (D:D) to demonstrate the positional change of each row entry based on its previous position?
E.g. if data from row 2 moves to row 4, D4 will = “-2” or if data from row 20 moves to row 10, D10 will = “+10”.
In case it makes a difference, the values in A:A will be unique text. B:C will be calculated numbers.
I have a workbook where I have displayed a table where the user can view the top 3 IDs based on a column they can select from a dropdown (Measure A, Measure B, ... , Measure H):
Now, instead of this, I want to add a separate column called Sorting Criterion to the table that would store the column names with which the respective rows of the table was sorted. So, the expected output is something like this:
How do I do this? I'm open to using Tableau Prep Builder, if needed, for intermediate steps that may be too convoluted for Tableau Desktop.
Create a calculated field that just contains the Sort By parameter. Add this calculated field to your view.
I hope to explain clearly what I'm trying to do.
I have some data in column B, grouped as shown in column A.
I'd like to count the unique values for each group present in column A, not taking into account the unique values already counted in the previous group(s).
For instance, I'd like to:
count unique values in 'proyecto2' NOT COUNTING the unique values already present in 'proyecto1'.
count unique values in 'proyecto3' NOT COUNTING the unique values already present in 'proyecto1' and 'proyecto2'.
count unique values in 'proyecto4' NOT COUNTING the unique values already present in 'proyecto1', 'proyecto2' and 'proyecto3'.
and so on...
Below you can find a Google Sheet with the solution I found, even if I'm not very happy with it, to show easily what I mean.
https://docs.google.com/spreadsheets/d/1x8S76_6dUnHr1NtUbzNzpLTpQtqan6_ohemcrGsrpC0/edit#gid=0
Basically, in column A:B, we have the INPUT DATA. You can add data in column A and B to see how it works (my method, at the moment, only work if you add one of these groups in column A: 'proyecto1', 'proyecto2', 'proyecto3', 'proyecto4', 'proyecto5' and 'proyecto6').
In column D:E, we have the output data, basically, the unique values counted by the group.
In column G:W, the formula to process the data.
Clearly, my method is working up to 'proyecto6' since in the "processing columns" I'm taking into account formula only up to 'proyecto6'.
Everything is working but my question is: could you suggest me a more dynamic way of achieving what I'm trying to do? Or the only way is to write some code?
delete everything in range D:Z
paste to D2 cell:
=UNIQUE(A2:A)
paste to E2 cell:
=ARRAYFORMULA(IF(LEN(D2:D);
MMULT(IFERROR(LEN(G2:Z)/LEN(G2:Z); 0); TRANSPOSE(COLUMN(G2:Z2)^0)); ))
paste to G2 cell:
=TRANSPOSE(UNIQUE(FILTER(B$2:B; A$2:A=D2)))
paste to G3 cell and drag down:
=TRANSPOSE(UNIQUE(FILTER(FILTER(B$2:B; A$2:A=D3);
NOT(COUNTIF(INDIRECT("G2:"&ROW()-1); FILTER(B$2:B; A$2:A=D3))))))
I am trying to make a list which is partially automated by vlookup and the user complete the values (from a list) that Vlookup didn't find.
after the list is completed, the values are copied to other Sheet to save the data for analysis.
for example: column A is business names ("McBurger"), Column B is category ("Food") each category is a defined name, and column C is sub-category ("Junk").
Now, Column B (category) has Vlookup in the cell, to find (from other sheet) if the "Mcburger" was already defined as "Food". Column C also have Vlookup in the cell, to find (from the other sheet) if the "Mcburger" was already defined as "Junk" in the subcategory.
If vlookup find the match, it complete the list automatically, if not...the list stays empty and the user need to complete the category and subcategory with dynamic range from a list.
Column C (subcategory) is a dynamic range of column B(category)
from what I've tried, when column B (category) is empty, then trying to write the dynamic range in column C, gives error: Data validation in C1 =indirect(B1) because it cannot direct to a blank....
How can i create a list that part of the data that was previously filled, is pulled to the row, and the rest is manually entered by the user.
Appreciate your help in any direction to solve it, not necessarily in the way i describe above.
Thank you !
I am new to Tableau and I am trying to filter the results in one sheet based on a selection made in another worksheet. Below, I provide a basic outline of the problem in general terms.
Suppose I have a Sheet A and I filter on dimensions C1 and C2. Based on this I get 10 rows of my data (the original data is 100 rows, suppose). Now, I want to display only the values corresponding to these 10 rows in another worksheet B but filtered on a column C3 (not the original columns C1 and C2), i.e., I want to select the 10 different values in Column C3 and show results in sheet B corresponding to these values.
I tried Filter Action but it seems I can create filters based on the filters I have chosen on Sheet A, i.e., C1 and C2. How can I create a filter corresponding to column C3?
Thanks for your help. Please let me know if the question is too general or not clear.
I didn't totally understand your question but will try to help with whatever I understood.
You can create a filter for Column 3 in the second sheet and when you use action filter in Sheet 1 in dashboard it shows the data based on the action filter and also the filter for Column 3 set for sheet 2.
You can also use parameter.Firstly create a parameter for column3. Create a calculated field using that parameter and use the calculated field as input for the graph or table you create in sheet 2.
Refer these links for calculated fields and parameter:
https://www.interworks.com/blog/rcurtis/2016/05/26/tableau-deep-dive-parameters-calculated-fields
https://www.interworks.com/blog/anonymous/2012/03/26/how-create-and-use-parameters-tableau