Kibana : How to dissociate a visualization from timepicker - kibana

I have a Kibana dashboard with some visualizations and each visualization changes when i change the time window. Is there a way to display a visualization that does not change and stays fixed? For example, i want to display the total number of records present in my index. Now i have this in a nice dashboard. I only want this number to change if the actual number of records changes. Otherwise, I want it fixed. Is that possible?

You can use a second index pattern for that. It is a kinda hackish solution but it works.
Create a new index pattern. Configure it just like your regular one, but uncheck "contains time-based events". This way you will get an index pattern where the time picker doesn't apply.
Create your visualization from this second index pattern.
In case you want a certain fixed time range to apply: Add the time range as a normal filter in the query for this visualization.

Related

Obtain values from Shiny context from cmd

I am looking to get the values from a reactive function, based on a specific set of inputs, but without the dashboard open or visible. Is this possible?
I have two possible solutions, both of them I am not sure are possible, and which of the two would be better. Also, I do think there could be a better solution.
Start the dashboard at a specific time and write away a csv with the required information. I don't know how to put the input values to the right settings though (they would be different from the normal initial settings). Hopefully start this without a visible endpoint (headless chromedriver for example).
Within Shiny, do a check if it's a specific time. If that's the case, change all inputs to the right settings, and export/do something with the required values. I don't prefer this, as there will be users using the dashboard at that time, and I don't want to disturb their work.
To give a bit more context, I would like to obtain values/dataframes from several dashboards at a specific time. These values are calculated via a chain of multiple reactives and inputs. I cannot trust that these dashboards are already running, so I need to start them.

Show Two Groups in Tableau Heat Maps

I’m relatively new to Tableau and have a question.
I want to create a heatmap show the location of two different groups of people. I’ve learned how to overlay maps using dual axis but the problem I keep running into is that each group requires different filters to aggregate the data the way I want.
Basically, I want to show:
Group1.id IF charge_id IS NOT NULL
And
Group2.id IF status = ‘ACTIVE’
Whenever I create a calculated field with one of the above calculated fields and place it in the filters box it automatically removes the other group from the map because the filters contradict one and other.
Help is much appreciated 😊
The filter shelf applies to the entire worksheet, so if you want to “filter” each field selectively, use an IF expression in a calculated field that evaluates to null when you don’t want that field in the view.
Give sample data if you want more detail

How to auto restrict the view in rpivottable to be data protection compliant

I am starting a customer lifetime project at work and want to share how the data looks with the business, as I want to be able to identify the important variables with them. I plan to do this using the excellent rpivottable package and launch a shiny app to see where there are basic differences in groups to select my features.
This would mean I have my customer base of 4million customers and slice and dice them in a number of ways.
However, following GDPR we need to ensure no group is shown that has less than 7 customers in it. Therefore I need somekind of background calculation to ensure that less than 7 customers are never shown.
If I think logically about this, the only way I could see it working would be to make a change to the pivottable, have some form of submit button, so that the size of groups could be calculated, and then a filter (which needs to be hidden from the user so it cannot be switched off) is applied.
I know I should provide code, but I do not know where to start here. Has anyone had similar issues and has a potential solution to all or part of the problem?
Has anyone built a hidden filter into their rpivottable?
Has anyone been able to restrict their output to only show 90% of their data?
Thanks,
J
To be absolutely sure, you would need to load in a data frame that looks like "dim, dim, dim, count" where count is always greater than 7. Basically just a bit of preprocessing on your input data. Unfortunately, this means that you will be restricted to a small number of coarse dimensions, else you will end up filtering out everything.

Array calculation in Tableau, maxif routine

I'm fairly new to Tableau, and I'm struggling in building some routines that could be easily implemented in Excel (though it would take forever for big sets of data).
So here is the deal, consider a dataset with the following fields:
int [id_order] -> id of the sales order (deepest level, there are only unique entries of id_order)
int [id_client] -> as I want to know who bought it
date [purchase_date] -> when the customer bought the product
What I want to know is, for each order, when was the last time (if ever) the client has bought something. In order words, what is the highest purchase_date for that user that is smaller than current purchase_date.
In excel, approach is simple (but again, not efficient)
{=max(if(id_client=B1,if(purchase_order
Is there a way to do this kind of calculation in Tableau?
You can do this in Tableau using table calculations. They take a little time to understand how to use well, but are very powerful and flexible. I posted a sample Tableau workbook for a similar question in an answer for SO question Find first time a condition is met
Your situation is similar, but with the extra complication that you want to repeat the analysis for each client id, so you might want to try a recursive approach using the Previous_Value() function instead of the approach used in that example - though I'm not certain that previous_value() will fit your situation.
Still, it might be helpful to download the example workbook I mentioned to get an idea how table calculations can address similar problems.
Just to register the solution, in case someone has the same doubt.
So, basically the solution I found use table calculation, which is not calculated until it's called on a sheet (and is only calculated on the context of the sheet). That's a little bit limiting, so what I do is create a sheet with all the fields I need (+ what is necessary for the table calculation) then export the data (to mdb) and connect to this new file.
So, for my example, the right table calculation is (let's name it last_order_date):
LOOKUP(MAX([purchase_date]),-1)
Explanations. The MAX() is necessary because Lookup (and all table calculations) does not work with data directly, only with aggregations. You can use sum, avg, max, attr, whatever suits you. As in my case there will be only 1 correspondence, any function will do just fine and return the same value.
The -1 indicates that I'm looking for the element immediately before the current entry (of the table, as you define it). If it were FIRST(), it would go for the first entry of the table, and LAST() would go for the last.
Now, I have to put it on a sheet. So I'll bring the fields id_client, id_order, purchase_date and last_order_date.
Then I have to define the parameters of my table calculation last_order_date (Edit Table Calculation). I'll go to Compute using and choose advanced. Now I'll do Partitioning: id_client, and addressing all the rest. What will that do? This mean Tableau will create temporary tables for each id_client, and table calculations will use those tables as parameter.
Additionally, I will Sort by field purchase_date, Max (again the aggregation issue) and ascending, to guarantee my entries are in chronological order.
Now, what will it do? For each entry it will access the table of the id_client, and check what was the purchase_date that is immediately before the current entry (that is being assessed), exactly what I need.
To avoid spending Tableau processing in Visualization, I often put all the fields in details (and leave nothing on screen), use Bar chart (it's good because it allows me to see the data). Then I export it to mdb, then connect to it again. Unfortunately Tableau doesn't directly export to tde.

Drupal - Auto Weight

Is there a way to automatically set a weight to nodes in Drupal? I am wanting to achieve this, because I am creating a blog layout and I want the most recent articles to appear on the top of my secondary menu rather than on the bottom.
By trying to sort by a dynamically iterating weight field, you're adding complexity to something that is really quite straight forward. This scenario is best handled by sorting by the created, or updated date of the node. I mean, by definition, that will allow you to sort by the most recent article. Heck, even sorting by the node ID would be better, since you have a value that's automatically increasing for every item that's created.
A weight field should only be used when sorting needs to be empirical, like a todo list or something. If you're using a weight field because you want to adjust the sorting of an article later on, you would still get the desired result by sorting by multiple columns (i.e. weight ASC, created DESC).

Resources