Tableau not displaying all dates till current date - tableau-api

I have a tableau worksheet that shows a count of records by date. Current system date is Mar 14 but my dataset has data only till Mar 9. Is it possible to show dates from Mar 10 - Mar 14 even though there is no data for this time frame.
Given is a snapshot of my worksheet, kindly let me know how could I include all dates in the row even though there is no data for this time period.

Select discrete row it will show the date on a sheet

Related

PowerBI Matrix with Year and Month

In the matrix below I have data from Jan 2020-Jan 2021, where the Jan column has the data from both 2021 and 2021. Is there any way to have the matrix add another column for Jan 2021 instead of aggregating that in with the Jan 2020 data?
Chose Year and Month in the date hierarchy column and then in the matrix click "expand all down one level in the hierarchy.
I am new to Power BI and I was wondering recently myself about something similar.
You can create a new column (text format) and combine month and year.
Date
Date Modified
dd-MM-yyyy
yyyy-MM
or
Date
Date Modified
dd-MM-yyyy
yyyy-MM (MMMM)
or
Date
Date Modified
dd-MM-yyyy
yyyy-MM (MMM)
It is not the most elegant solution, it changes a bit what is displayed (not simply months in the headers), it has a few disadvantages but it works.
I would be curious myself whether a better solution exists.
If you click on the date column you are using [InvoiceDate] and select the date option, it will separate out the two date values.
currently it is in a hierarchy showing just the month values but not the actual date
i have this but mine stays summed up at the year level even though the 'month' is expanded under the TimeByDay...
If I take out the year it will provide it like above but combines both... or as is it puts columns in the year

Fetch data from database in jasper report and display it in text field

I want to fetch the date from the database and then need to manipulate on that date to display the due date in the jasper report.
Table name is: ACCOUNTINGLOCATION
Column name: CURRENTACCOUNTINGDATE  (dd//mm//yyyy time)
Once we fetch the CURRENTACCOUNTINGDATE from databse , Use this date as base to generate the due date in the text field. Due date is nothing but the next month 14th. 
Suppose the CURRENTACCOUNTINGDATE = 21.01.2019 then in the report I should display the value as 14.02.2019( dd/mm/yyyy)
For Jan the due date will be feb 14. for Feb due date will be march 14 and so on. 
Can you please help me with this code. 
You can use builtin date/time functions to compute the date:
<textFieldExpression><![CDATA[EDATE(DATE(YEAR($F{CURRENTACCOUNTINGDATE}), MONTH($F{CURRENTACCOUNTINGDATE}), 14), 1)]]></textFieldExpression>
With DATE(YEAR(..), MONTH(..), 14) you get 14th on the current month, and then the EDATE function is used to add a number of months (1 in this case) to the date.

how to get previous day date in unix/SunOS

I am using below code
TZ=Etc/GMT+169 date '+%m/%d/%Y'
but above code print the current date
the Idea is I want to go behind 7+ more days in unix system for that I am just adding 24 to GMT It is working for 6 days only. If I increase GMT value after 169 it is printing current date.

Comparing quarterly data to same time period a year ago

I have quarterly data for 2018 (Q1-Q3) which I would like to compare with the same time periods from a year ago so 2017 Q1-Q3.
Where it gets a little tricky is that I would like for my workbook to be smart enough in Q1 2019 to know that it only compares for one quarter in 2018 and when Q2 2019 data rolls in it uses 2 quarters and so on and so on.
Is this possible in Tableau?
For those that are interested I have generated some random data in the format of my workbook in Excel for import into Tableau. Here is the link to the data.
Try the following:
IF DATEPART('year',[datefield]) - 1 = DATEPART('year',TODAY())
AND DATEPART('quarter',[datefield]) < DATEPART('quarter',TODAY())
THEN [valueField]
END
This will compare with previous year's data.

Creating Dynamic Date Column Headings in Cross Tab for Business Objects

BO Version: 12.1.0 on Infoview,
O/S: W7
I am creating a report in infoview, which is a cross-tab. I have departments on the row side and for the column I want to have all Saturday dates dynamically displayed, and this is dependent on the date prompt values I put in to the report when I run it.
So if I put in for the prompts Dec the 08th 2013 to Jan the 04th 2014 I should see 4 Saturday dates (14th/21st/28th/04th) along the column headers.
I started off using a variable and using the function relativedate, which gave me all the dates I wanted:
=RelativeDate(LastDayOfWeek([Query 1].[Episode End Date]);-1)
but because I used -1 to get the Saturday date it was giving me the Saturday before the earliest prompt date, so I was getting these dates instead:
(07th/14th/21st/28th/04th)
Is there a way I can get these dates but ignore the previous day (the 7th) before the start prompt date?
I want to have this dynamic so that if I put a date range in it shows me all the saturday dates within that range along the top of the report regardless of the date range period.
Andrew
The reason you're having trouble is that WebI (being ISO compliant) considers a week to run from Monday to Sunday, but your reporting week ends on Saturday.
So, I would approach it this way:
=RelativeDate(
LastDayOfWeek(
RelativeDate([Query 1].[Episode End Date];1)
)
;-1)
If we evaluate some dates with this logic, we'll see the desired result:
Testing 12/8 (Sunday):
Add one day = 12/9
Get Last Day Of Week = 12/15
Subtract one day = 12/14
Testing 12/12 (Thursday)
Add one day = 12/13
Get Last Day Of Week = 12/15
Subtract one day = 12/14
Testing 12/14 (Saturday)
Add one day = 12/15
Get Last Day Of Week = 12/15
Subtract one day = 12/14
I'm at home and don't have access to WebI right now, so I can't test this myself, but the logic should be sound.