Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

condition based expression

from this:

vb1.PNG

to this, zero values are also fine:

vb2.PNG

I want to hide price and amount from product B and only show totals for the products A en C, i cant figure this out in Qlikview.
any suggestions?

Im using a pivot table with three expressions:

Amount:

(sum(amount)/count(DISTINCT Month))

Price:

(sum(total))/

(sum(amount)/count(DISTINCT Month))

total:

sum(total)

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe something like this to show only Amount and Price for D

(sum({<Product = {D}>} amount)/count(<Product = {D}>}  DISTINCT Month))


Or


If( Match(Product,'D'),(sum(amount)/count(DISTINCT Month)), '')


[both expressions for Amount calculation in a chart with dimension Product]

View solution in original post

8 Replies
sunny_talwar

Do you have a sample you can share with us?

swuehl
MVP
MVP

Maybe something like this to show only Amount and Price for D

(sum({<Product = {D}>} amount)/count(<Product = {D}>}  DISTINCT Month))


Or


If( Match(Product,'D'),(sum(amount)/count(DISTINCT Month)), '')


[both expressions for Amount calculation in a chart with dimension Product]

buzzy996
Master II
Master II

see my comments from this thread.

Expression based on condition

don't put condition on total else apply condition like above link suggested.

nocondition on total.PNG

Not applicable
Author

this worked thank you, is there a way to turn zero values into white cells ?

Not applicable
Author

Hi Tim Janse, if you want see just the products 'A' and 'C' add a 'Calculated Dimension' in place of 'Product' like dimension.

Try this 'Calculated Dimension':

if( Product='A' or Product='C' , Product)

With this, you will see in your Pivot Table the row values for product 'A' and 'C'.

I hope that it help you,

Regards

Not applicable
Author

But if i do that i cant see the totals for product B

swuehl
MVP
MVP

And to keep  the threads in-sync:

Please don't create multiple threads for the same topic, it's really hard to follow a discussion.

Seems you got a similar answers in both threads anyway

swuehl
MVP
MVP

Tim Janse wrote:

this worked thank you, is there a way to turn zero values into white cells ?

Like a mentioned above?

If( Match(Product,'D'),(sum(amount)/count(DISTINCT Month)), '')