Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Expression Independent from dimension

Hi,

I have 10 stores that sell 20 different products.

How can I create a straight table that, for every products, tell me how many stores didn't sell that product?

Tags (3)
5 Replies
neetha_p
Honored Contributor

Re: Expression Independent from dimension

Hi Patrizio,

Dimension: Product

Expression: Count({<Sales = {'0'}>}Stores)

Not applicable

Re: Expression Independent from dimension

Your data is aggregated or each transaction level ?

You can Try like below:

Count({<Stores={"=Sum(SalesAmount)=0"}>}Stores)

Re: Expression Independent from dimension

Hi Patrizio, maybe:

Count(TOTAL DISTINCT Store) - Count(DISTINCT Store)

MVP
MVP

Re: Expression Independent from dimension

Dimension: Product

Expression: = Sum( Aggr( If(Sum(SalesAmount)=0,1,0), Product, Store))

dean44811
New Contributor

Re: Expression Independent from dimension

The problem is with the incoming data.   You can't display what doesn't exist.  

Add a sale of 0.0001 to each product that the store didn't sell.  

When you sum sales the missing store data for a product will be $0.00  

A bar chart will also show what looks like zero sales for stores that didn't sell product. 

Missing.jpg

Community Browser