Show Filter and Sort ICon in grid for display only when data is filtered and sorted at server side - ag-grid

Requirement:
I want to show the filter and sorting icons to appear on the columns but do not want to use the data sorting and filtering at the client side of the grid. All the sorting and filtering is done on the server side. I just want to show icons on column is filtered and sorted. At the same time i want to show the filtered text.
Scenario:
User selects the filter. Column shows sorting and filtering icon.
Request is send to server. All the data is sorted and filter on the server.
New Data is shown in the grid. Columns sorting and filtering icon are removed.
I just want to show icons ( sorting and filtering ) on the column and the filter text.
Is it possible to just add icon ( sorting and filtering ) and filtering text to the grid. I cannot change any behavior for server side request.
Currently, I am sending the request to server whenever filtering or sorting is done. Data gets changed and loaded in the grid. But all the sorting/filtering icon are lost and also the filtering text which was used.
If i set gridOptions.api.setFilterModel()
or gridOptions.api.setSortModel() then it goes to infinite loop.

Related

Is there a way in Tableau server to limit the rows displayed but then download the complete data into a crosstab?

I have a large text table (about 200k records) that's generated from a custom SQL query. I've added filters so users can limit the output, but the text table is still quite large, so rendering of the table is pretty slow. I know that I can limit the rows displayed using a calculated field like Index(). However, what if I want to limit the rows displayed to the user, but still enable them to pull the full dataset? In other words, lets say they filter by ID #123 and the text table has 5k records with ID #123. I want to display at most 100 of these records in the dashboard and if they need the complete raw data, they can pull the 5k into a crosstab. Currently, if I apply an Index to limit the rows displayed in the dashboard to 1k, they'll only be able to download 1k records to the dashboard.
Ultimately, the purpose is to make the raw data available, but make the experience using the dashboard a lot faster.
You could create a separate sheet purely for download. When downloading all of the records on the Detail shelf are exported - the fields don't need to be visible in the dashboard. Therefore you could create some form of dummy field - perhaps something simple like a SUM([Number of records]) - to display in the view with the remainder of the fields hidden on the Detail shelf. This means the view won't take an age to render but the fields will still export.

Always included data irrespective of filter in Tableau

I am building a (pivot) grid in Tableau and want to always include a data point (a row in the fetched dataset) in the resultant view, irrespective of any filters the user selects. Is this possible?

Tableau Desktop Filter Disable/Enable

Working on Tableau desktop[Making a visualization] have two filters one cascaded to another.Need a help when making multiple selections in one filter should disable another filter. If one selection is made in a filter then other filter should be enabled and shown.
Looking for answers
Tableau graph
You could solve this in a dashboard using the sheet/object swapping and popping technique as explained here. Basically how it works is having a dummy sheet which is empty on a certain condition but which will have values if not. The parameter will be placed below this sheet which results in it moving downwards/upwards whenever the condition changes. Together with a motionless opaque text field it becomes possible to hide the filter. I tested the solution underneath.
You will need a calculated field hide_names which results in True if the condition is filled. In your case:
if COUNTD([Manager]) > 1 then False else True end
Next create a dummy worksheet which you will fill with another calculated field which does almost nothing e.g. 'a'. This sheet will be used to 'pop out' the filter in your dashboard. To have this functionality you need to drag the newly created hide_names into filters and filter on the custom value False.
Now let's look at the dashboard.
First bring in the original sheet together with the relevant filters.
Right click the manager filter and select "all using this data source". This way your dummy sheet will also be aware of changes in the filter.
Then create a horizontal floating object in which you need to drag the names filter. On top of the names you need to drag the dummy sheet so if the sheet is active it will push down the second filter.
What you should have now is once you select more than one manager a sheet containing 'a' is shown and the second filter is pushed down. This is not ideal. You will need one or two more things depending on the actual lay-out of your dashboard.
You can make your dummy sheet entirely white by changing the format so all rows/columns/text display white, disabling the tooltip and removing headers and titles.
Create a new empty floating text object. Right click on it and select format text object. Select white shading for this object. This way it becomes opaque. Drag and change dimensions of this object so it hides the second filter whenever the dummy sheet is shown.
Once you have all of these elements you can sort of play with it to make it work. You can find a demo of a dashboard with similar but not exactly the same functionality here.

Tableau Filter from calculated field, but I want to exclude some

I am trying to add to my current calculated field.
It is a fairly simple LEFT(UPPER([STR]),2) that I am currently using. This populates a filter list. However, I want to either modify the formula or the list itself to only include [STR] items where underlying data is and for any that do not have data, they are left off the list until they have data to be selecting.
think of the STR as if it were states abbreviations. IF COUNT([Things]) = 0 then I don't want the state on my filter list, but if there is or if there later gets some Things added in that state I want it to show up.
I tried using IF COUNT([Things]) > 0 THEN LEFT(UPPER([STR]),2) END but that doesn't seem to work. I am also open to just using a condition for showing the filter if that can work, but I am not sure how to set that up.
Strangely I had tried this solution before. I choose Show only relevant values on the filter in the filters box, that made it show nothing at all. However, if you click the drop down arrow on the Show filter card and choose show only relevant values that works.

Tableau add formula to dashboard action filter?

I've got a workbook I'm building using public data https://public.tableau.com/profile/alee4645#!/vizhome/JSAClaimantsWardtimeseries/Dashboard1
The basics are working as I want, you see the map, you click on one of the coloured areas and a time series chart appears below the map showing the change over time for that area.
I want to add a couple of comparisons to this data, for example I want the time series chart to show a line for the whole coloured area (Somerset) so people can see how one part of it compares to the overall average.
I have the figures as separate rows in the data but of course when the action filter is triggered they get filtered out along with everything else.
If I edit the action filter in the filter shelf for sheet 2, it has the condition tab and I was hoping I could add [ward code] = "E10000027" (the comparison data I want to use) to the formula box so it would also keep the relevant rows of data, but that stops the chart working altogether.
I could achieve it by getting people to choose an area from a parameter drop down but I'd rather let them click on the map so they don't need to know the name of the area they are interested in.
Can this be done?