Value elements class for Date time format - simulation

My data is of following format (Arrival times), then what should be the "Value elements class" in the LinkedHashMap Collections for column Arrival times?
Input table

This is not a direct answer to this question, but from your other question I am getting an impression that you're doing this to create a number of entities that are emitted from the Source component on schedule.
If this is the case then you're in luck as Source component has an option to set arrival based on a table of date/time values. You can see more in the help documentation here and that page also has a link to an example model that shows how to use it.

Related

Setting toDate function as arrival time Anylogic

I'm already struggling for days to use dates from excel in a proper way in anylogic..
I've created a database in where the date is formulated as integers in different columns since otherwise excel is messing up the dates (for example year=2021 , month=12 day=5 hour=6 minute=44 second=0 stands for 2021/12/5 6:44:00)
Now I know this can be converted to a date by the function toDate(year, month, day, hour, minutes seconds). But how can I use this integers to create agent with specific parameters from the database in a source and add to a custom population?
The most simple way is to add a column where the function toDate(......) is added in the database but I do not know how to do this (see picture if it is unclear). Or are there other solutions?
One way: use Dynamic Events.
Create one and in the action code, write mySource.inject(1)
In Main, on startup, load all dbase rows and create a DE for each row, below assuming it is only with an hour-column:
(Use the database query wizard to adjust your query).
In your source object, set it to "call of inject() function"
This will work, but it is quite cumbersome, as you can see. Much easier if you get your Excel right and just import the date column clean and well so you can use the Source option "arrival table in database" directly. I know you need regular arrivals, so maybe code that up in Excel to give you these on specific dates...

Tableau converting dimension to measure

I have a technical question relating to Tableau. I have a Category field in the dimensions section which has three indicators: Disposable Income, GDP and Consumer Expenditure. I would like to convert 'Disposable Income' into a measure value on its own.
Is this possible to do?
I cannot share the Tableau data source due to data restrictions.
It is very easy. Add a calculated field named Disposable Income as-
IF [category] = 'Disposable Income' THEN [Measure_Val] END
Needless to say [Measure_val] is your measure field name here.
Alternate solution to your problem I propose here, but it needs reshaping your data altogether. I have created a sample data for explanation like this
select three years column and click on pivot.. you will get a view like this after renaming the fields appropriately
From here you can proceed as described above.

In Tableau, is there a way to only show the first and last date in the table output using the date filter

Tableau will generally show every single date within table output of the date ranges filtered for. Is there a way to only show the first and last date in the table for the date of ranges selected?
I created an image of the desired output in excel. Link below:
Desired output example
Thank you in advance!
The feature that will address your goal is called a Level of Detail (LOD) calculation. They have many uses and take various forms. I suggest reading about the in the online help.
But, to answer your question, the LOD calc to find the first (i.e. minimum) value in a date field called, say, Transaction Date, is;
{ MIN([Transaction Date]) }
The formula for the latest value is left as an exercise for the reader 😊

Get full date range of linked field in tableau

Gif of problem
I am currently working on a dashboard in tableau, which shows the count of New-User-Signups and Interactions side-by-side given different date windows. The first New-User-Signup happened before the first Interaction, and the last Interaction happened after the last User Signup.
In order to choose a date window, I linked the date fields in both data sources, and made a date filter, which I applied to all worksheets using related data sources.
However, depending on which "date" field I choose, (from the User Signup table or the Interaction table), the "All Dates" option of the date filter only goes from start to end of that data source's date range.
No matter what I try, I exclude some entries in either one graph or the other. How can I make the "All Dates" filter go from the minimum first date between both data sources, to the maximum last date between the two data sources?
I run into this issue a lot with the data that I use. The problem is that the filter will only be able to contain dates that are in the dataset it is created off of, even if you link the data sources. When I run into this issue, I use parameters instead.
You can find instructions here:
https://kb.tableau.com/articles/howto/creating-a-filter-for-start-and-end-dates-parameters

Why does icCube require Data Table for a time dimension

The documentation states (the words in brackets are mine):
[A time wizard dimension] allows us to define/generate a time
dimension without any underlying data table.
The accompanying image in the documentation does not show a field for entering a data table. However, when I look at the definition of the Time dimension in the demo Sales cube (version 6.5 of icCube), I see that a data table is in fact used. Also, there is no option in the drop-down menu to not specify a table. So, it becomes not clear what is special about the time dimension. What am I missing?
In icCube there is nothing really special about a "time" dimension.
However, you can define a time dimension as any other dimension using a table or using the "time wizard" that is going to generate days between the specified from and to dates (therefore no need of table).
The demo Sales schema is defining a time dimension using a table.
In its definition, a dimension is flagged as time (and possibly default time dimension) because it can be used as the default rollup hierarchy with custom aggregation (e.g., open non empty).
Note that several MDX functions (e.g., parallelPeriod, dtXyz) allows for navigating a time dimension in quite a specific way.