How to compute for an average with specific date range in TIBCO Spotfire? - spotfire

I have a data table (1 month data) opened in TIBCO spotfire, I have Date, User ID and defect rate columns.
I want to have a calculated columns which, it will only average the defect rate of the last 15 days from the date now.
Can someone help me to write the calculated columns formula?

You can use a data limiting expression in a visual
[Date] >= dateadd('dd',-15,DateTimeNow())
For a calculated column is the it in a sum if statement
Sum(if( [Date] <= dateadd('dd',-15,DateTimeNow()), 1,null))

Related

subtract two column pivot table using calculated value

I need to find the average of profit by subtracting ( average budget from average revenue ) , both these two column calculated by pivot table
I tried to input this in the calculated field: =AVERAGE('Box Office Revenue ($)')-AVERAGE('Budget ($)')
and then summarized field value to Average but still show summation.
i don't need to subtract the summation of these two column but i need to subtract the averages.
Can you please support in that.

Compare column value with series of auto sum value in Power Pivot?

I have problem where i need to get the number of weeks after which my stock will run-out.
In my table i have:
"Forecast Regulier calc." which is the total sales.
And the auto generated total is the project stock.
Each value of "Forecast Regulier calc." in column is the sales on that particular week. Now the goal is to compare the sales of each week with the series of all auto generated total values and get the difference in column values where the two values match. And this will be the number of weeks after which our stock will run-out.
Please let me know if the description is not clear.
.

How to include cells with today date in SUMIFS formula

I've got raw data in a sheet with columns containing items number, product type, date, etc...
Date format is: 25-01-18 9:20
I'm trying to get a SUMIFS formula to report number of items arrived today.
Like =SUMIFS(Sheet2!G1:G924,Criteria1,Criteria2,etc)
Any idea?
Thanks in advance
If there are times in the data you can do >= today and < today+1 to count all items on todays date, e.g. if your date/times are in column H this sums column G for all today's items
=SUMIFS(Sheet2!G:G,Sheet2!H:H,">="&TODAY(),Sheet2!H:H,"<"&TODAY()+1)
Or for a simple count of today's items
=COUNTIFS(Sheet2!H:H,">="&TODAY(),Sheet2!H:H,"<"&TODAY()+1)

How do you create the max and min date in DAX

I have a date column with dates going from 2016 to 2018. I wanted to create a calculated field in the data model that will output the max date and the min date.
This is the column with the date.
I want a way to have the max and min date to output on the excel part of the workbook. So basically I want to have a date range in the report.
You could use MIN and MAX as analytic functions:
SELECT
date,
-- other columns
MAX(date) OVER () AS max_date,
MIN(date) OVER () AS min_date
FROM yourTable;
This is speculative, but is correct if what you want is to show the min and max date from all dates as computed columns.

Excel sum from multiple columns where date between several columns

I need help with excel sum calculating!
I have a table with 4 Amount Fields and 4 Date Fields
Excel Table
I need to Calculate sum from all amount columns which are in particular month and get a result like this:
January 2016 - Total Sum
January 2017 - Total Sum
etc...
I already try this:
=SUMIFS(A2:A9,B2:B9,">="&"09/01/2016",B2:B9,"<="&"09/30/2016")
for finding the sum for column A between dates in column B, but i cant figure out how to accomplish calculating sum for all Amount Columns which are between all Date Columns...
Thank You in advance for your help...
Try this:
=SUMIFS(A2:G9,B2:H9,">="&"09/01/2016",B2:H9,"<="&"09/30/2016")
Note how the columns are offset by one.

Resources