If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Category Baselines using Layout Calculation

Started by Rebeca, 14 Jan 2016 06:05:16 AM

Previous topic - Next topic

Rebeca

Hello,

I would like to know how do you draw a Category Baselines using Layout Calculation. When I want to draw a Static Category Baselines I use the option 'Category Index' and it works well but when I want to draw a dynamic Category Baselines doesn't work!
I have a Line chart with one measure and one dimension (Date) and I have created a query that contains the date in which I want to draw the line. When I insert my report expression in my Layout Calculation and I choose the appropiate query and I select my field in the option 'properties', I get an xml error when I want saving or I run it.

Xml Error:
The report specification contains an error at line ' 306', column ' 411'.
Attribute 'refQuery' is not declared for element 'v2_ordinalBaseline'RSV-SRV-0042 ....

Any suggestion??

Thanks in advance!

Regards

Gollapudi

Hi Rebeca,

Not quiet sure of the issue description, will you be able to attach a sample report spec, so that I can have a look.

Cheers,
Gollapudi.

MFGF

Quote from: Rebeca on 14 Jan 2016 06:05:16 AM
Hello,

I would like to know how do you draw a Category Baselines using Layout Calculation. When I want to draw a Static Category Baselines I use the option 'Category Index' and it works well but when I want to draw a dynamic Category Baselines doesn't work!
I have a Line chart with one measure and one dimension (Date) and I have created a query that contains the date in which I want to draw the line. When I insert my report expression in my Layout Calculation and I choose the appropiate query and I select my field in the option 'properties', I get an xml error when I want saving or I run it.

Xml Error:
The report specification contains an error at line ' 306', column ' 411'.
Attribute 'refQuery' is not declared for element 'v2_ordinalBaseline'RSV-SRV-0042 ....

Any suggestion??

Thanks in advance!

Regards

Hi,

I don't have time to look into this in detail at the moment, but the first thing that strikes me is that a layout calculation appears to be the wrong approach. Layout calculations are designed to be included in the report layout (pages/tables/blocks etc) and allow you to display objects not necessarily related to a query. Is there a particular reason you chose a layout calculation rather than a query calculation? Query calculations are designed for use within a report container (list/crosstab/chart/map/visualization etc) and are inherently tied to the query driving that object. It sounds to me like this might be what you should be using here?

Cheers!

MF.
Meep!

Lynn

Quote from: Rebeca on 14 Jan 2016 06:05:16 AM
Hello,

I would like to know how do you draw a Category Baselines using Layout Calculation. When I want to draw a Static Category Baselines I use the option 'Category Index' and it works well but when I want to draw a dynamic Category Baselines doesn't work!
I have a Line chart with one measure and one dimension (Date) and I have created a query that contains the date in which I want to draw the line. When I insert my report expression in my Layout Calculation and I choose the appropiate query and I select my field in the option 'properties', I get an xml error when I want saving or I run it.

Xml Error:
The report specification contains an error at line ' 306', column ' 411'.
Attribute 'refQuery' is not declared for element 'v2_ordinalBaseline'RSV-SRV-0042 ....

Any suggestion??

Thanks in advance!

Regards

I can't replicate that error message but I struggled to get the baseline to appear when referencing date datatypes. In my example I displayed the first day of the month for 12 months as the category and created a query calculation to find the first day of the current month (my data has future dates). I used one measure as the series.

I set my layout calculation for the category baseline to be where these two values are equal. I can see in the tabular data that it is correct, but no baseline appears. The IBM article link, below, indicates a need for casting to ensure data types are compatible so I tried various things but the only method that worked was casting both of my dates to strings in the query expression. None of the report layout casting options when defining the layout calculation expression did the trick for me.

Both of my items are in the same query and I did have to ensure the "Properties" property included the current month I needed for comparison.

I realize it isn't a direct answer to your question because I don't get that error, but maybe it might give you some other areas to investigate or approaches to take.

http://www-01.ibm.com/support/docview.wss?uid=swg21419198

Rebeca

Thanks for your answers!

I try to draw a vertical line on a line chart, no horizontal line, so I don't use 'Query Calculation' because I don't have that option. My only options are 'Layout Calculation', 'Category Index' and 'Percent on Axis' (%). When the option 'Category Index', I can to draw the line but it's static line. I need to draw dynamic line but I get the same error again, maybe what I want to do it's not possible... I'm lost.


Product Version is 10.2.1, maybe in anothers versions it's possible?

Thanks!

Lynn

Quote from: Rebeca on 15 Jan 2016 09:49:21 AM
Thanks for your answers!

I try to draw a vertical line on a line chart, no horizontal line, so I don't use 'Query Calculation' because I don't have that option. My only options are 'Layout Calculation', 'Category Index' and 'Percent on Axis' (%). When the option 'Category Index', I can to draw the line but it's static line. I need to draw dynamic line but I get the same error again, maybe what I want to do it's not possible... I'm lost.


Product Version is 10.2.1, maybe in anothers versions it's possible?

Thanks!

I am on 10.2.2 but I don't think anything in this area was changed since 10.2.1. I absolutely achieved a dynamic category baseline so we know it is possible.

Can you explain in more detail about your report that might help diagnose the problem? Is there only one query involved? What is the expressions used to determine the date that the line should be drawn for? What is the expression for the layout calculation? Is your source relational or dimensional?

Gollapudi suggested you attach your report spec. If that isn't an option can you mock up something similar using the sample database?

Rebeca

Hi everyone!

I have tried to do an exercise with sample database although it isn't an exactly my case.
The model is Datawarehouse VA (Analysis).

Now, you can see there is not an option 'Query Calculation' in Category Baselines, so If I want to draw a dinamic line I have to use 'Layout Calculation', isn't? But it is so, how can I do it?

Many thanks! I hope you can help me to give a solution!

Regards.


Lynn

Quote from: Rebeca on 18 Jan 2016 05:38:49 AM
Hi everyone!

I have tried to do an exercise with sample database although it isn't an exactly my case.
The model is Datawarehouse VA (Analysis).

Now, you can see there is not an option 'Query Calculation' in Category Baselines, so If I want to draw a dinamic line I have to use 'Layout Calculation', isn't? But it is so, how can I do it?

Many thanks! I hope you can help me to give a solution!

Regards.

Hi Rebeca,
I gave you a response with rather a lot of detail that you seemed to ignore, instead you responded only to what MFGF posted about a query calculation. I then responded again asking specific questions, most of which you also ignored.

The sample report you posted is against a dimensional source. You haven't mentioned what type of source you are using before now, although I did specifically ask you that. The solutions for relational vs. dimensional sources are VERY different. Please review the forum etiquette post here.

Attached is a sample report that has a dynamic category baseline using a layout calculation. It is dynamic based on response to a prompt. The MUN is an important aspect when dealing with dimensional sources.

If you need help beyond this then you will need to provide specifics about your particular problem including what the basis is for setting the baseline, what the MUNs look like for your category, what elements you have on the category, etc.

If you don't understand my responses and therefore decide to ignore them rather than asking for clarification then just let me know and I'll stop responding.

Lynn

Rebeca

Hi Lynn,

My model is dimensional and my case is similar to atached example's case. The only differences are type of data, anyway, with the example is enough for starting because in the example it isn't work. In the example, in 'Layout Calculation', if you choose one query, instead of a number you have my error from my first post. I can't do it in the example because it can't save because it's an xml error. If you need more specific I will try it!!
I'm sorry about my English.
My sincerest apologies if something has not been right.

Regards!

Rebeca

I don't know about MUN ...I have never seen it. I'm sorry about this, I am begginer with Cognos.

Lynn

I gave you a working example against the sample GO sales package. You can see if it helps you understand how you might apply something similar in your situation.

Rebeca

In the third step onn IBM's example (http://www-01.ibm.com/support/docview.wss?uid=swg21341101) says :

'Select Member Value from the list and Click OK' and I don't have this option. As you can see in the following picture:



My Cognos version is 10.2.1 and in the example is Cognos 8

Regards!

Lynn

Quote from: Rebeca on 19 Jan 2016 05:06:30 AM
In the third step onn IBM's example (http://www-01.ibm.com/support/docview.wss?uid=swg21341101) says :

'Select Member Value from the list and Click OK' and I don't have this option. As you can see in the following picture:



My Cognos version is 10.2.1 and in the example is Cognos 8

Regards!

I think it is reasonable to assume that different versions of the software are different so it probably won't help in this case to wonder why a Cognos 8 article isn't applicable in Cognos 10.

I've attached another working example using members on the node instead of a set expression. There is a query item that determines which item gets the baseline. I've simply picked the 'Mail' order method as the item to get the baseline. You've not given any details on the basis for what makes the baseline dynamic and you didn't respond asking for clarification on anything in my previous example that uses a prompt.

You will need to add the baseline data item to the "Properties" property for each node in the category. Personally I think the original method I posted is better, but this seems closer to the example XML you posted.

At this point I respectfully bow out of the thread as I believe your question has been answered with 2 different working examples.

rhuet

#13
Hi Lynn,
You mentioned that the solution for creating Category Baselines is very different for Dimensional vs Relational data sources.  I'm having the same problem as Rebeca but with relational queries.

If you wouldn't mind explaining how the solution is different for relational sources, that would help me out tremendously.

Thanks,
Robert

Lynn

Quote from: rhuet on 11 Feb 2016 09:48:43 AM
Hi Lynn,
You mentioned that the solution for creating Category Baselines is very different for Dimensional vs Relational data sources.  I'm having the same problem as Rebeca but with relational queries.

If you wouldn't mind explaining how the solution is different for relational sources, that would help me out tremendously.

Thanks,
Robert

In the relational world a date is a date. In the dimensional world every member has a MUN (member unique name). You couldn't try to write a condition to match a MUN to a date any more than you could write a condition to compare an integer to a date. They are different things.

You should be able to write an expression to determine where the baseline goes just the same as you would write any expression since your source is relational. You don't have to worry about MUNs. My first response deals with the challenges of dates to determine a baseline, but you didn't indicate what particular problem you have so I'm not sure what else to advise.

Can you describe your requirement in more detail and what the problem is precisely? I never did replicate the error originally reported if memory serves but I can get a category baseline based on a calculation.

rhuet

Thanks for the clarification, Lynn.  Here are my relevant details:
Im using Cognos 10.2.1.
I have a report with a combination chart that uses [Date] as the category chart node member, and I want to display a vertical line everywhere [Date] = [End Date] in my chart data source.  Here were my steps:
1 - Select Combination Chart
2 - Click on "..." for Category Baselines in the Properties pane
3 - Click icon for "New" baseline and select "Layout Calculation" (Query Calculation is not available)
4 - Enter expression: "[Full Query].[Date] = [Full Query].[End Date]"  NOTE:  These are members of both in my chart query.
5 - Click Ok
6 - Select the [Date] chart node member and add [End Date] to Properties.
7 - Select "Layout Calculation" and add [End Date] to Properties.

When I run the report, I get the following error:  An unsupported data type "cdDTypeVariant" was found at or near the position '2,047' in expression: "[Full Query].[End Date]".

Note:  If I add [End Date] to the Layout Calculation Properties and not to the [Date] node, that's when I get the same error as Rebeca "Attribute 'refQuery' is not declared for element 'v2_ordinalBaseline'RSV-SRV-0042 ...."

Hope this makes sense.
Thanks,
Robert

rhuet

Yea!  Got it to work!

I created a new member in my query called [isIterationEndDate] which I set to 1 if the dates matched, else 0.  I then created a category baseline expression of "[Full Query].[isIterationEndDate] = 1" and added this new member to my [Date] chart node Properties, and it worked!

Thanks for you prompt response to my questions.
Robert

Shah

#17
Hi all,

I am on Cognos 10.2.1.
I have a combination line chart with one item on y axis and 4 items on the category (x) axis. I want to draw a vertical category line on the category item on 2nd level. I tried methods mentioned by 'rhuet' and 'Lynn' but still no line appears or I get lines at every level.
Besides I also tried to have separate matrix charts for each level of 2nd category and for that I have applied the column matrix but I get duplicate category items with every subplot. It looks like in every subplot only the data line for the remaining subplots are hidden (in the case of grouped primary axis) or with zero values (in the case of stacked primary axis), but the category labels as well as the space are still reserved for those items. Can someone plz help?