Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to show unsold product ?

hi everyone,

we have this case in attached where in blue bar we have fidelity card those buy category x and the red one shows idelity card those don't buy category x . we would like show in table the fidelity card (their number) in red bar, but we no idea how to do it.

 

i try with  sum({1-$} value) in data set analysis but in this way there are all fidelity card and not only the pharmacy's cards.

fidelity card value
80022233323,50 €

 

please can help me.

thanks

 

7 Replies
diego_a_barboza
Creator
Creator

Hello Sarah,
You want to see the value of the fidelity cards that didn't buy a product or a product category?
First, you need to flag the sales on the load script, so you can see which records are showing a sale, then you will use that flag
Then, you can remove the sales from the total, and you will get the missing fidelity)
rangesum(SUM ( {< FLAG_SALES = {1} >} value ) , -1 * SUM ( {< FLAG_SALES = {1} >} value ))
Anonymous
Not applicable
Author

Hello Diego,

i can't modify the script and i have drill down dimention ( if i click on category x i drill down in lower level until single product).

so i can't use your advice.

thanks a lot in any case.

diego_a_barboza
Creator
Creator

Sarah,

And what about checking the field where you record the sale? I assume that there is a field that allows you to discern if there was a sale or not, if so check the value on that field, something on the line:
rangesum(SUM (  value ) , (-1) * SUM (  {< sales= {">0"} >} value ))

Anonymous
Not applicable
Author

hello Diego,

only field that i have is where Sum(value) is null (you can see it in attached). but i don't know how identify it, because using if(sum(sales) is null(),0, sum(sales)) i don't get nothing.

i would like display only the card without sales (in attached whre sum(value) is "-")

thanks

johanlindell
Partner - Creator II
Partner - Creator II

I think a simple "If" should do it in a chart with [Product field] as a dimension

If (Sum (Sales) = 0 or IsNull (Sum (Sales)), 'No sales', Null ())

 

If you need it in a dimension use Aggr.

Aggr (If (Sum (Sales) = 0 or IsNull (Sum (Sales)), [Product field] Null ()), [Product field])

 

Not tested on data but it should work

Anonymous
Not applicable
Author

Hello, thanks for your help but your formula doesn't work for my purpose.

Anonymous
Not applicable
Author

anybody cam heilp me?