5 Replies Latest reply: Apr 25, 2013 7:31 AM by got dope

# How to fix a dimension while following the current location

Hello,

First post so I'm sorry if I'm not in the right part.

I have a chart in which I compare the revenues from the total products with a specific product or group of prroduct that I select with the current selection.

My problem is that the "all products" line is working fine and displaying 2010 to 2012 revenues

here is the expression:

sum({1<[Prd.Solution Line Id]={'96100'}>} [Rev.Amount rev])

then I have my comparison graph expression

Sum ({\$} [Rev.Amount rev])

My problem is that by default, the "all products" grah will be for all period (2010-2012) while my comparison graph will be only related the period I select...

Anyone knows how I can have also the specific product display on the same range as the main one?

Also I would like to know where I can find some material and examples to be able to train myself on such formulas....any ideas except in the manual?

• ###### Re: How to fix a dimension while following the current location

You can modify the expression to disregard selections in the Period field:

Sum ({\$<Period=>} [Rev.Amount rev])

Replace Period with the actual name of your period field.

• ###### Re: How to fix a dimension while following the current location

it works and I don't feel lonely anymore in front of QV :-)

• ###### Re: How to fix a dimension while following the current location

Hi,

I have an add related question.

What would be the below formulas if I want it to follow the selected period which name is Dte.year?

sum({1<[Prd.Solution Line Id]={'96100'}>} [Rev.Amount rev])

Thanks

• ###### Re: How to fix a dimension while following the current location

Try:  sum({1<[Prd.Solution Line Id]={96100}, [Dte.year]=p([Dte.year]) >} [Rev.Amount rev])

This means disregard all selections and filter Prd.Solution Line Id on value 96100 and use all possible values of Dte.Year (that's what the p() function does, select the possible values).

You can leave out the single quotes around 96100 since it's a number. Matching numbers is faster than matching strings so not using the quotes here would make it a bit faster.

At some point you may want to remove the 1 and exclude individual fields instead from the selections

sum({<[Prd.Solution Line Id]={96100}, Field1=, Field2= >} [Rev.Amount rev])

• ###### Re: How to fix a dimension while following the current location

It's perfect!

Thanks again