Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

chrisgoudy
New Contributor II

ProductFlag used in Charts to always show a specific product

How can I use my ProductFlag to automatically reduce a chart so it always shows only those products no matter what selection is made or if selections are cleared?

1 Solution

Accepted Solutions
jason_michaelid
Honored Contributor II

Re: ProductFlag used in Charts to always show a specific product

Assuming a simple expression Sum(Sales), try instead Sum({<ProductFlag={1}>} Sales)

Hope this helps,

Jason

7 Replies
jason_michaelid
Honored Contributor II

Re: ProductFlag used in Charts to always show a specific product

Assuming a simple expression Sum(Sales), try instead Sum({<ProductFlag={1}>} Sales)

Hope this helps,

Jason

Re: ProductFlag used in Charts to always show a specific product

There are a lot of ways, give me an example and I will help you in the best way (I hope so)

chrisgoudy
New Contributor II

Re: ProductFlag used in Charts to always show a specific product

is there a way to do it for the entire model or the whole chart instead of entering it into each expression indvidually like Sum({<ProductFlag={1}>} Sales)?

jason_michaelid
Honored Contributor II

Re: ProductFlag used in Charts to always show a specific product

So you don't want to add this into a chart, but according to your initial post you don't want to make any selections either!?  How do you propose to let QV know you want to limit the data...?

What exactly is your requirement here?  Judging by your other recent posts you want to limit certain people to only see Shebo data.  Someone has already suggested using section access - you may want to consider this again.

If have misunderstood what you're after, please explain again and I'll try to help.

Cheers,

Jason

chrisgoudy
New Contributor II

Re: ProductFlag used in Charts to always show a specific product

i've entered it into each expression in my chart and it works great. Was just curious if instead of entering it for the 5 expressions in the chart I could just enter it once in the chart somewhere and get the same results?

jason_michaelid
Honored Contributor II

Re: ProductFlag used in Charts to always show a specific product

You might only have to put it in one expression - depends on other settings. You could probably put in in the dimension using a fairly complex calculated dimension but you would get a perfomance hit.

Please mark a correct answer to close the thread.

Cheers,

Jason

jagannalla
Valued Contributor III

Re: ProductFlag used in Charts to always show a specific product

Hi,

You can achive this through variable.

Create a variable:

Settings -> Document properties -> Varaible tab


Click on New button & give a variable name. Say for eg: vChartExpr

- Now give your expression for variable as Sum({<ProductFlag={1}>} Sales)

- Don't give any equal sign infront variable expression.

- Now give your chart expression as =$(vChartExpr)  where ever you want.

- If you change your expression in variable it will effect in all charts.

Hope it helps you

Jagan