
1. Re: How to find difference in data for start and end time in day?
Andrew Watson Dec 9, 2016 2:44 PM (in response to subodh Thapliyal)I think I understand what you want. You will have a filter for a time period and want to the the value from the beginning of the period and the value from the end of the period and calculate the difference?
Assuming that is the case you can get the earliest time by this formula:
{MIN([Date])} or {FIXED:MIN([Date])}  these formulae are both exactly the same
For the last (or max) date change the formula to be MAX  i.e. {MAX([Date])}
To return the value of the min date:
IF [Date] = {MIN([Date])} THEN [Value] END
and the value of the max date, IF [Date] = {MAX([Date])} THEN [Value] END
Your final calculation could be SUM(IF [Date] = {MAX([Date])} THEN [Value] END)  SUM(IF [Date] = {MIN([Date])} THEN [Value] END)
One very important thing to add  add your date filter to CONTEXT.

2. Re: How to find difference in data for start and end time in day?
subodh Thapliyal Dec 9, 2016 4:52 PM (in response to Andrew Watson)Hi
Andrew,
Thank you very much for your response, but this solution work best for only one parameter.
If i have 20 parameter to show and need to find difference in each, how will it work.
Will greatly appreciate if you can attach a workbook as an example.
Subodh

3. Re: How to find difference in data for start and end time in day?
Andrew Watson Dec 11, 2016 2:18 PM (in response to subodh Thapliyal)1 of 1 people found this helpfulUsing your example dates I've published an example to Tableau public: https://public.tableau.com/views/EarliestAndLatestTimePeriodDifference/Differencebetweentimeperiods?:embed=y&:display_co…
You're welcome to download the workbook.

4. Re: How to find difference in data for start and end time in day?
subodh Thapliyal Dec 12, 2016 8:59 AM (in response to Andrew Watson)Thanks Abdrew, that helps