Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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?

Many thanks for your help!

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?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for the quick answer!

it works and I don't feel lonely anymore in front of QV 🙂

Not applicable
Author

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

Gysbert_Wassenaar

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])



talk is cheap, supply exceeds demand
Not applicable
Author

It's perfect!

Thanks again