AnalyticsDetails - SAP : Issue with accumulated result by Periods - annotations

I have problems to define the correct result of amount in a query because this result is separate by period, in theory it is ok, but if the period 2019 finish in 2000 then 1 period of 2020 should be start with this 2000 and not in zero.( for example )
enter image description here
This is an example of code in the cds view that I'm using for this value:
#AnalyticsDetails.query.formula: '$projection.Boe'
#EndUserText.label: 'Ending Balance in BOE Quantity'
0 as BoeQty
I'm using the Tr RSRT for check the Query but the object is in Eclipse Ide.
Well ... check that by Fiscal year the sum working well, but , I need to add maybe some #AnalyticsDetails: But I cannot found nothing that works like this accumulated result.
Let me know if is necesary more details.
Thanks.

Related

Report Today minus 1 day

need help with this query DB2 IBM
SELECT
ABALPH AS Kunde,
SDLITM AS Artikel,
SDDSC1 AS Beschreibung,
SDSOQS AS Menge, date(digits(decimal(SDIVD+1900000,7,0))) AS Invoice,
decimal(SDUPRC/10000,15,2) AS Einzelpreis,
decimal(SDAEXP/100,15,2) AS Gesamtpreis,
SDDOCO AS Dokument,
AIAC01 AS Region
Now my question is , how can I get the today date minus 1 day ?
Thank you so much
have test it with ADD_DAYS doesn´t work.
I do not see the point in your query where a date is referenced but your query seems incomlete anyways because join contions are missing.
In general you get todays date with current date and you get yesterday with current date - 1 day
Check out this query:
SELECT current date, current date - 1 day
FROM sysibm.sysdummy1
Per the DB2 documentation, ADD_DAYS is valid with negative numbers for previous days. See example 4 on that page. So usage like this should have worked:
ADD_DAYS(DATE(...), -1)
or
ADD_DAYS(CURRENT_DATE, -1)
You should post your specific attempted usage of it and the error that is reported when you try it.

Relative Date filtering Query Editor - Power BI

I don't understand the logic of Power Query Editor.
I have a big table with data from 2019 to 2024 (one column contains the monthly information).
I want to filter the data by the date of that column, but it has to be dynamic.
Two options:
The data I want to consider is "Current month -2". So all historical data minus current month.
The data I want to consider is a parameter extracted from somewhere (e.g. I set the latest month to consider manually somewhere in an Excel, which usually is "current month -1" but not always (best).
I would be happy with any of the two solutions.
Currently I found somewhere this formula which filters out vs last month:
= Table.SelectRows(#"Changed Type",each [Month]< Date.From(Date.StartOfMonth(DateTime.LocalNow())))
But somehow I do not find the way to go 2 months back.
Thanks a lot!
BR

Tableau Volume calculation based on Start Date and End Date

Using Tableau, I need to create a visualisation that shows me the total volume of started and ended work items per day.
Typical sql data consists of columns for each:
Reference (Unique Work Item Reference)
Start Date (Date Work Item Started)
End Date (Date Work Item Finished)
For example, if on the 6th of April 2018, 55 work items were started and 5 items were finished. Each represented date should show in its own line over time.
The issue I'm getting at the moment, when I have start date as a continuous column, it calculates the number of work items started for the end date and not the number of items finished for the end date.
Any help guidance would be greatly appreciated.
Tableau Public Link
This is a simple problem if you correct the shape of your data. You can achieve this by using the pivot functionality in Tableau or Custom SQL(If your data source does not support pivot).
Pivot the date columns
2. Rename the pivoted fields
Now build the view as below.(null values are due to tasks that are not yet closed, you can just filter it out)
I assume that the data is of this form Data structure
With this format, you could achieve something like this Gantt Chart
If you notice, I have created a calculated field called "Duration" which is in size shelf.
the calculated field reads
If [Status]="Finished" then
[End Date]-[Start Date] ELSE
TODAY()-[Start Date]
end
Hope this helps! Let me know if this is not clear enough
Even if the Status column is not there in the data source, it can be added using the following code
if ISNULL([End Date]) then
"WIP" else "Finished" end
Also, is this how you want to see the information?
Click here
Could you please have a look at it and let me know your thoughts?
https://us-east-1.online.tableau.com/t/tableaumanoraj/views/VolumeExample/Dashboard1?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no

Tableau - Building a calculated field based on a filtered date range

I need to build a calculation that takes into account whether or not someone checks on a day in Tableau. Currently using Tableau 10.0.5.
For instance, say I have the following data
Date Amount
1-Oct 100
1-Oct 120
2-Oct 150
3-Oct 200
4-Oct 250
5-Oct 500
I need a way to calculate the total amount for the days that are checked in a filter. So, if a user selected Oct 1 to Oct 3, the amount would be $570. Any ideas on how to make this happen are appreciated.
I know how much we all love to work with dates in Tableau! :-)
If you are not showing dates in your viz then simply sum([Amount]) will give you the sum of amount for selected dates.
In case you want to show individual dates and sum of sales across all dates you will have to use Level of Detail Expression
{ EXCLUDE [Date]:SUM([Amount])}
Here is the URL for Example

Crystal Reports 2011 time -24 hours

I have created a report that pulls all the data from the previous day's production. The problem with that is our operations is two shifts and information from second shift is entered around 230 AM the next morning (ex. production was the 15th, but they didn't enter data until 16th at 230AM).
This is the formula that I used:
date({REJECTS.PROD_DATE})=dateadd('d',-1,currentdate).
I tried this formula with the same results: date({REJECTS.TIME_STAMP})=dateadd('h',-24,currentdatetime).
I have verified that REJECTS.TIME_STAMP is a datetime field.
Any help would be great,
Thanks
Trevor
Add this to your report's record-selection formula:
// timestamp should be new than 24 hours before the current date/time (calculated dynamically)
{REJECTS.TIME_STAMP} >= DateAdd("h", -24, CurrentDateTime)
// include other restrictions as necessary
AND ...
My approach would be:
Create a String parameter and give default values for 24 hours... in the required format (either half hour format or Hour format).
If you require check the link for parameters.
2 use below formula in Record Select Expert
{REJECTS.TIME_STAMP}>=Cdatetime(Cdate(dateadd('d',-1,currentdate)),Ctime({?tme})) and
{REJECTS.TIME_STAMP}<Cdatetime(CDate(dateadd('d',0,currentdate)),Ctime({?time})) and
Now when you run the report you will be prompted for time.. select the time and you query will be formed as required by you.