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

Style Variable for Singletons from Two Different Queries

Started by Cognos_Jan2017, 15 Oct 2018 03:35:16 PM

Previous topic - Next topic

Cognos_Jan2017

We are utilizing a Table w/ many Singletons and many Queries, and that is bringing in the correct values.

I understand for a Style Variable to be recognized that IF the comparison Data Items are
from the SAME Query, just add those Data Properties to the Singleton and a Case When
works.

The problem is we have Two Different Query Singleton values to be compared, IE ...
Case
When [Query1].[ALL_CF_IncRate] <= [Query2].[ALL_PF_IncRate] Then 'Green'
When [Query1].[ALL_CF_IncRate] > [Query2].[ALL_PF_IncRate] Then 'Red'
End

We should be able to Join Query1 and Query2, but that will add more Queries.
Am wondering what Cognos Analytics 11.0.11 Limit might be on the number
of Queries it will accommodate.
  So far, it is fine.

Is there a way, other that joining Query1 and Query2 to make the Style Variable Valid?

TIA, Bob

Cognos_Jan2017

S O L U T I O N ...

For simplicity illustration, wrote 1st Join Query joining
Query1 and Query2
... to have Data Items
[ALL_CF_IncRate] and [ALL_PF_IncRate]

Added another Data Item [IncRate_Diff] ...
[Query1].[ALL_CF_IncRate]-[Query2].[ALL_PF_IncRate]

Style Variable utilized ...
Case
When [IncRate_Diff] >= 0 Then 'Red'
When [IncRate_Diff] < 0 Then 'Green'
End

In the Singleton for [ALL_CF_IncRate], added as a Data Property
[IncRate_Diff], and assigned the defined Style Variable to the
Text Item for [ALL_CF_IncRate].

All is fine.