views:

431

answers:

3

Is there a way to change the default value of the Time Intelligence Post Formula??

I have a Dashboard where I use From Date and To Date filters, to calculate the values between the user selected period, for those filters I use the Time Intelligence Post Formula,however the default when the user enters the page is always today's date on both filters. (and from today to today analysis doesn't make sense for this)

What I would like to to is have a From Date be something like 30 days before today's date, but not forced on the report receiving the filters, I just want the filter to have a default value and then let the user choose whatever he wants.

Anybody knows of something that can be done, or this just can't be done?

EDIT:

Throught research on this link showed me that it can't be done via Normal Ways:

sgrice asked this question: I love the calendar and the ease of linking it to my cube; however, we never have data for "Today" which is the default date. Therefore, our dashboards are always blank when they first come up and our client has to select a date. Is there a way to change the default date?

The author of the post says on a comment reply:

No sorry, but I will enter this as a feature suggestion.

Thanks,

Alyson

So there's no formal way of doing it so I'm trying to do this in another way. So I'm trying to do it in an more undocumented and obscure way, throught javascript. I would appreciate help on finding a way to do this.

A: 

You have to create two calendars, and then map one to the start date and one to the end date. This is described in this comment on the Performance Point blog.

The technique is as follows:

To work with a start and end date you need to create 2 calendars. Then you link one calendar to <> and the other to <>. As formula you just enter Day:Day. In the report you will have to create a set called 'DateRange' or something similar.

WITH 
SET [DateRange] AS
   <<StartDate>>.Item(0) :  <<EndDate>>.Item(0)
SELECT
NON EMPTY 
[DateRange]
ON COLUMNS,
{ [Measures].[Price Total] }
ON ROWS
FROM [TurnoverCube]
Nathan DeWitt
Nathan, that's not what I asked, I wan't to change one of the calendar's DEFAULT date, not the value the Report receives, i have two calendars so the users can set a range, the report dashboard MUST show the date's the user have selected, not - 30 days of the first date.
Gabriel Guimarães
Did you even read the title of the question?????
Gabriel Guimarães
relax gabriel. you already said this wasn't the right answer, and you downvoted me. give it a rest.
Nathan DeWitt
You may rest now, but don't forget the 5 months schedulle (quoting your blog post). lol tks for helping
Gabriel Guimarães
A: 

I've solved it throught javascript and JQuery. I Basically checked what the calendar did, and reproduced it, I've realized it toogled the visibility of the calendar when you clicked on day, and since I wasn't interested on that i removed it, and called a method with this name pps_TI_calendar_render passing three parameters, one was the id of the calendar td, and the other two was the date you've selected in a complete name. I've checked if it would accept just two parameters, and the date in a simpler format the result is this javascript call (note that i'm only changing the first pps date calendar):

pps_TI_calendar_render(  $('.pps_calendarToggleDown').first().parent().closest('td').attr('id'),'01/01/2010');

(this date format is month/day/year) if you put for example 14/01/2010 it will place the calendar in february first of 2011. So Watch out.

NOTE In the first parameter I've used a JQuery selection to get the id I wanted, this could be changed, but the parameter needs to be the id of the element pps uses.

Hope this helps.

Gabriel Guimarães
I would like to understand why is this answer not a good one, if it doesn't help at all I can delete it. However for me it works
Gabriel Guimarães
A: 

Olá Gabriel,

Estou passando pelo mesmo problema que você passou, preciso alterar a data default do calendário para (data atual - 1 dia) porém não existe um metódo nativo no PerformancePoint para isso. Procurei bastante pela internet e a única referência que encontrei foi a sua solução via javascript/JQuery.

Você consegue me passar mais detalhes sobre a solução que implementou? Como você editou a página publicada pelo PerformancePoint, inseriu uma webpart no SharePoint, inseriu esse método no onload da página?

Eu tentei adicionar uma webpart na página publicada no SharePoint e chamar o método pps_TI_calendar_render a partir de lá, porém não funcionou. Para descartar qualquer problema de sintaxe ou função JQuery, tentei chamar o método de forma hardcode ( passando manualmente o id do TD e data para o método ) mas nem assim funcionou.

Tentei também editar a página gerada no SharePoint sem a adição de webpart, mas não consegui encontrar uma forma de editar, porque acredito que o sharepoint armazena essa página em banco de dados e pelo SharePoint Designer só consigo acessar o código fonte da Master Page, mas pelo que entendi o código que contém o método pps_TI_calendar_render e toda a lógica do calendário está dentro de uma webpart gerada automaticamente pelo PerformancePoint e essa webpart não consigo editar pelo SharePoint Designer.

Qualquer informação adicional sobre como implentou a solução irá me ajudar bastante.

Obrigado!

Wilton Sobreira

Wilton Sobreira
Wilton. You should post in english!After you have jquery on the page.The Hardcore method is using IE url bar with:javascript: pps_TI_calendar_render( $('.pps_calendarToggleDown').first().parent().closest('td').attr('id'),'01/01/2010','01/01/2010'); void(0);And pressing Enter.After that you should use JQuery ready function and setTimeout function
Gabriel Guimarães

related questions