Dynamic date parameters in tableau - dynamic

How to pass dynamic date parameters in tableau for which one parameter is 2022-01-01 and second parameter changes every quarter last day

Firstly, you should create a Calculation Field that represents END QUARTER. There're different ways, for example:
where DATETRUNC() - the beginning of the current quarter (01/07/2022),
DATEADD('quarter', 1) - obviously add 1 quarter (01/07/2022)
And -1 day to find the of the current quarter.
And when you create a Parameter, you should refer to this Calculated Field:

Related

Using MDX in SSAS tabular get first 10 days of each month

I am trying to dynamically get the dates, starting from begging of month to current date using SSAS Tabular - DAX, I have tried many date functions but I couldn't end up with solution, so is there any idea to share pls ?
The following DAX function will return a table of DATES for each day from the start of the current month through today:
DatesMTD = CALENDAR(DATE(YEAR(TODAY()), MONTH(TODAY()), 1), TODAY())
To be able to filter the dates for the first 10 days, create a calculated column that identifies as a date in this range
1st to 10th Date = If(Day([Date]) <11,1,0)
This can then be used to either filter out the dates past the 10th of each month

Calculate the date of the previous month and the date before previous month using current date (data flow, ADF)

I have a date column which is the first day of each month (eg, 2020-01-01), I want to calculate the date of the previous month (eg, 2019-12-01) and the date before the previous month (eg, 2019-11-01). In the expression builder, do we have any function to handle it? Thank you
You can use subMonths function, something like:
subMonths(toDate('2020-01-01'), 1)
subMonths(toDate('2020-01-01'), 2)

Pass the monthly value of an SSRS report chart into another report with date from and date to parameters

I have a yearly chart that it broken down into the 12 months Jan - Dec. The report contains various parameters including a yearly dropdown that changes the chart and report.
This all works fine within the first report.
The problem is that I have set up an action on the chart to go to a second report with a monthly breakdown, so my question is how can I pass the monthly value from the first report to the second?
The monthly report has an additional date from and date to parameter, so for the month of January it would need the values: Date From: 01/01/2010 and Date To: 31/01/2010 for example.
Thanks in advance.
Since you have the year and month integer values, you can construct the start and end dates to pass to your other report using expressions.
The start of the month will be:
=DateSerial(Fields!Year.Value, Fields!Month.Value, 1)
Where Year and Month are the integer values from the Chart/Dataset.
The end date is a bit more complicated; since the day part can be 30/31, etc, but we can just add one month to the above expression to get the first of the next month, then go back a day:
=DateAdd(DateInterval.Day
, -1
, DateAdd(DateInterval.Month, 1, DateSerial(Fields!Year.Value, Fields!Month.Value, 1)))
This way your drillthrough report can get its date based parameters and you don't need any changes to your dataset/parent report.

including the datediff expression within the table in a row in MS Access 2007

I have a 3 column in my table as start date, end date and total days. All I need it the following
How to set the current date in the start date column
Another question is how to get the date difference and the result should be displayed in another column called total days.
The start date can be set so that the default value is the current date, date(), when a record is created. You do that in design window. Since the other two fields are clearly filled in at a later date the mechanism for input can use the same function as a default end date. The difference is then calculated between current date and start date. If you use a form as the mechanism for update, the expressions are set as default values. If you use an update query, those expressions would be set as the updating values.

How to group by week specifying end of week day?

I need to run a report grouped by week. This could be done by using group by week(date) but the client wants to set the day of the week that marks the end of week. So it can be Tuesday, Wednesday etc. How can I work this into a group by query?
The datetime column type is unix timestamp.
The WEEK() function takes an optional second parameter to specify the start of the week:
This function returns the week number for date. The two-argument form of WEEK() enables you to specify whether the week starts on Sunday or Monday and whether the return value should be in the range from 0 to 53 or from 1 to 53.
However, it can only be set to Sunday or Monday.
UPDATE: Further to the comments below, you may want to consider adding a new column to your table to act as a grouping field, based on WEEK(DATE_ADD(date INTERVAL x DAY)), as suggested in the comments. You may want to create triggers to automatically generate this values whenever the date field is updated, and when new rows are inserted. You would then be able to create a usable index on this new field as required.