Exclude/limit to current year from Prompt values- Cogno BI 11 - cognos-11

I have a prompt that allows users to select multiple years and provides data with each selected year as a column. However, I would like to provide a singleton with an average for all prior years. So if the user selects 2016, 2017, 2018, 2019, 2020 on the prompt menu, I would like it to return an average for 2016, 2017, 2018, 2019. Including 2020 would throw off the average.
I use the following expression to limit my data to the selected years, but how can I edit it to exclude the current year? #promptmany('PromptYear','memberuniquename','[All Years]','set(', '', ')')#
Or am I looking in the wrong place entirely??

Related

Compare performance range over the years for each unique school

I have a dataset with Year, school_id, Performance range (let's call it P_range).
Years range from 2019 - 2016
Performance Range from 0-5
Over 2000 unique school_ids
Basically I need to know how each school_id perfomed over the years within performance range.
Example:
YEAR
School_ID
P_Range
2019
1
4
2018
1
5
2017
1
3
2016
1
3
2019
2
1
I would like a fourth column that would look at the dataset and tell me in which year did its performance alter
2019-2018 this school decreased the range
2018-2017 this school increased the range
2017-2016 this school maintained the range
2016 would not compare to anything which is "First evaluation"
So at any given time, when we look at the results of 2019 we would see a sum of results being compared to 2018 and so on.
We need to know at a yearly rate, how many "maintained", "decreased" "increased" or "First evaluation"
If it were on excel this would be the formula:
=IF(B2=B3;IF(C2>C3;"INCREASED";IF(C2=C3;"MAINTANED";"DECREASED"));IF(B2<>B3;"1ST EVALUATION"))

Get max change between rows, ignoring empty cells at end of list

I have a spreadsheet where I'm tracking my net worth over time. Once a month, I add in my account balances.
In one sheet, I have this structure:
Date
Year
Net Worth
Account1
Account2
Account3
Jan 31, 2021
2021
$320
$200
$140
-$20
Feb 28, 2021
2021
$340
$200
$150
-$10
Mar 31, 2021
2021
$410
$250
$200
-$40
Apr 30, 2021
May 31, 2021
...rest of months for the year
The formula in the Year column is =if(C3<>"", year(A3), "").
The formula in the Net worth column is =if(sum(D3:F3)<>0, sum(D3:F3), "").
The Problem:
I'd like to have a cell which lists the greatest 1 month change (so $410 - $340 = $70), without having to update the formula every month. (In an ideal world, I never need to touch it again, only ever having to enter account balances once a month.)
What I've got so far:
=if(
abs(min(ArrayFormula(C3:C400 - C2:C399)))=max(ArrayFormula(abs(C3:C400 - C2:C399))),
min(ArrayFormula(C3:C400 - C2:C399)),
max(ArrayFormula(C3:C400 - C2:C399))
)
However, this includes the change from $410 to "", which is coerced to $0. So instead of the expected $70, I'm instead getting $410.
How can I get the greatest 1 month change, but ignore the empty string values?
Easiest way to fix it is just to put in an if clause I think:
=ArrayFormula(max(if(C3:C400<>"",abs(C3:C400-C2:C399),)))
because Max will ignore the empty string generated by the If statement
or slightly shorter:
=ArrayFormula(max((C3:C400<>"")*abs(C3:C400-C2:C399)))
so that the change for any empty cells is set to zero.
These assume that C2 itself is not blank!

Sorting by week in Google Analaytics Sheets add on

I just want to run a simple weekly traffic report with the Google Analytics Sheets add on. It does work fine, but I can't seem to figure out how to sort the weeks in chronological order with the jump from 2019 to 2020.
This is how it looks like
Order of the weeks
Does anybody know what Order I need to enter to have the order from week 38 - 53 and then continue with 1,2...?
Include the year as dimension and order by year and by week, like this:
year week
2019 38
2019 39
2019 40
...
2020 1
2020 2
2020 3
For multi year weekly analysis, it's better to just use the corresponding Mondays for any date for your grouping/summing/analysis than it is to use "Week Numbers"
Those mondays can be obtained by using this arrayformula, assuming your dates were in column A (A2:A)
=ARRAYFORMULA(IF(A2:A="",,FLOOR(A2:A+5,7)-5))

How to compare percentage change in year by only months entered?

I'm working in Google Spreadsheets trying to compare two years of data for each month.
year jan feb mar apr may etc
2012 4 3 5 6 4 3
2013 2 4 5
I want to be able to compare the data I have so far because if I don't have enough data, then the comparison will not be accurate until all of the months are complete.
How do I compare 2013's jan,feb,march to 2012's jan,feb,march and have it dynamically adjust?
For instance, if I input april, have it compare jan-april of 2012 as well.
Please try:
=IF(ISBLANK(B3),"",SUM($B3:B3)/SUM($B2:B2)-1)
in B4 and copy across to suit.
Yes, in this case the formula works (or not!) the same in Excel and Google Docs.

jQuery UI datepicker - Date Range - #to - set first month to display where numberOfMonths = 3 (it defaults to selected days month)

Hi, I have a 2 textboxes (#from and #to), with a date-range between them.
DateRange Datepicker
E.g. #from I select 10 October 2014
(The current popups show October,November,December)
Now at this stage the #to textbox has no value, when you click on the textbox, it shows from October 2014 which is absolutely perfect this is what I need. (I know this is because of the code in on onClose event as in the hyperlink).
The problem is that if I select e.g. December 2014 now in #to, and it closes, and I open #to again, it then shows December,January,February.
The requirement is that the user needs to not look forward in #to but he needs to see that the range was from October 2014 to December 2014 - and thus needs to see the three months on the screen as October,November, December and not the default 3 months that the jQuery UI Datepicker shows after a date has been selected.
Is it possible to set the first month that a 3 month calender has to display?

Resources