I have preview of matrix like this:
Columns "Report#" and "Headline Indicator" are added manually, "Report Month" is number of month that is used for row grouping, "1" and "3" are column group fields (department_key_id). Design on the picture below:
I want to sort data by first column "Report#".
I tried to configure some interactive for that column but it was not worked for me(
How can I sort rows with data in the table in this way - 2, 2, 3, 3, 4, 4, 5, 5?
thanks!
So it looks to me like you might need a couple of changes to get the set-up you want here. First, I'm going to recommend adding an ORDER BY [report_month_num] to your query and you can do away with the current row grouping on report_month_num.
You'll need to add a Detail grouping row for each of your four rows. So right click in any textbox, navigate to Add Group > Row Group > Adjacent below. Make sure to select Show detail data for each of the four groups you make. You'll need to copy the data into the new rows and you should be all set.
This should ensure the ordering you are expecting.
Related
I hope someone can help with a problem I’m facing. I’m pretty new to Data Validation using Custom Formulas so I’d appreciate your guidance. I hope I have explained the situation clearly. Thanks.
I want to use data validation in cell B1 (Portfolio Tab) which creates a drop down list of the number of columns (1 to 44). I want to use the list as a way to sort a table (Column Headers - C3:AT4).
https://docs.google.com/spreadsheets/d/1qunKbFGNzzGU9lNCPFow8igkR_gaPudmanTK-WM43mA/edit#gid=58173089
By selecting 1 from the drop down list I want my table to be sorted in Descending order by Portfolio%. Then if I want to sort by Name in Descending order I want to select 3 from the drop down list. Finally once I’m done sorting I want to revert back/reset to my original view. I want to do this without changing anything in columns A and B. Please assist. Thank You.
Issue with using asc
Issue with using asc (blank formula)
Query and hyperlink
Query and hyperlink
solution 1:
forget dropdown and use filter view inmerge row 3 & 4
delete row 1 & 4
select your range C2:AT
and creatte filter view
now you can sort one, multiple or all columns like:
solution 2:
create a duplicate of your sheet:
delete your range C3:AT
use this in C3:
=QUERY({Portfolio!C3:AT}, "order by Col"&B1&" desc", 2)
solution 3:
use sorting script... https://stackoverflow.com/questions/tagged/google-apps-script+sorting
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 need to sort my column of matrix in decreasing order of dates. I there any option? check this image of matrix
I need to order from Jan-20 to Jan-19(this column is already sorted with dates column). Thanks in advance.
One solution is to add a new column to define the search order in the way you want, in this case by date descending. So if you add a custom column in your model like this:
You can use it to sort your matrix - select it, click your date column in the fields pane, click Sort by Column button in Modeling tab and select the newly added column:
This will reverse the order of the column headers in the matrix:
I have reports in SSRS where I'm able to alternate the row colors using this expression:
=IIF(ROWNUMBER(NOTHING) MOD 2, "LightSteelBlue","WhiteSmoke")
This works great. However, I have a report that has a column grouping, and this seems to mess up the alternating row colors.
The grouped columns will alternate column colors instead of row colors. I've searched and found possible solutions with row groupings but nothing with column groupings, or at least nothing I can get to work. I'm just trying to have every other row be "LightSteelBlue" or "WhiteSmoke," nothing fancy.
Any ideas?
Here is the solution that I came up with:
Add a column to the right end of the table and name the text box "RowNumber." Set the visibility to Hidden.
Add expression to RowNumber text box.
=RunningValue(Fields!last_name.Value & Fields!entity_name.Value, CountDistinct, "dataset name")
Add expression to Background Color of the Details Row:
=IIF(ReportItems!RowNumber.Value mod 2 > 0, "LightSteelBlue", "WhiteSmoke")
The RunningValue() function needs unique values. In my case the member name can be repeated several times due to one member belonging to different entities. Therefore I combined last_name and entity_name to get a unique value.
Hope this helps.
Try using runningvalue instead of rownumber where the field name is the field in your details row:
=iif(VAL(runningvalue(fields!yourfield.Value,countdistinct,nothing)) MOD 2, "LightBlueSteel", "WhiteSmoke")
I have a matrix report with 9 Row Groups and 1 Column Group (Months).
Instead of showing duplicate rows on the row groups, SSRS and Excel merge those fields. I would like them unmerged! I would like them to duplicate on my report.
I tried going to the parent group and grouping by every other field. This worked until I added two rows within the group, (which I need).
I guess you could also say that I really want my row groups to look like a table. If there's a better way to do that, I'm all ears!
enter image description here
Is it TYPE field that you need all the lines for?
The bracket to the left (under Row Groups) indicates that you are Grouping on something. Remove the Group Only (but not the rows and columns) so you are not grouping and all lines will be displayed.