Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manoj217
Creator III
Creator III

finding unsaled products

Hi all,

i am showing an example data

table1:

load * inline [product

a

b

c

d

e

f];

table2:

load * inline [product,amount

a,100

b,200

c,300];

for this i want to get unsaled products, a, b,c has some amount value but d,e,f doesnt have an amount so i want to get those records to show in straight table

but that can need to solve in expression not in script can anyone help me.

3 Replies
kristof_j
Creator III
Creator III

I made a straight table with a calculated dimension

=if(aggr(count(amount),product)=0, product)

so if there is no amount found for product, product is shown, else nothing.

In the same Dimensions tab I checked 'supress when value is null'.

In the Presentation tab is unchecked 'supress zero values'


And I have a straight table with only the products with no sales !

techvarun
Specialist II
Specialist II

table1:

load *,product as productUnsold inline [product

a

b

c

d

e

f];

table2:

load *,product as productSold inline [product,amount

a,100

b,200

c,300];

Load productUnsold as Unsold  Resident table1 where not exists (productSold,product)

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Manoj,

Please add below in expression:

and your Dimension : Product.

IF(Sum(amount)<=0,'True')

From Add-ons property remove checkbox.

data1.png

Thanks & Regards,

Arvind Patil