Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dtbit123
Partner - Contributor II
Partner - Contributor II

sales disregard a selection

hi all,

very simple,

one fact table of sales with fields item id, customer id, and quantity

two tables of items and customers. linked to the sales table.

and the items  table has some flag of special items.

I want to show the sales in a chart of all items that flagged.

but if I select a customer the chart should show all items that flagged even if the this customer I select

didn't buy some items that flagged.

please help

thanks,

dt

18 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Add artificial "zero" records to your sales table, i.e. records for every customer and every is_pl=1 product with a quantity set to 0.

Good luck,

Peter

swuehl
MVP
MVP

Maybe like this chart only approach?

dtbit123
Partner - Contributor II
Partner - Contributor II
Author


thanks this looks good,

but I don't understand , if select custname isn't should show me the sales of all customers anyway ?

because the custname= in the set analysis in the expression.

dt

brijesh1991
Partner - Specialist
Partner - Specialist

just nullify your customername in set expression

Clever_Anjos
Employee
Employee

Use sum({$<custname=>}quant) as expression and tick 'supress zero values'

Clever_Anjos
Employee
Employee

I think using =aggr(Only({$<custname=>} partname),partname) would simpler than your dimension too

dtbit123
Partner - Contributor II
Partner - Contributor II
Author

In the expression if you use custname= you will get the sales for all Customers and its not the meaning... I need to see all the items even if the custname I select didn't Buy it Thanks Dt

Clever_Anjos
Employee
Employee

Hi Doron, in this case, you wanna see "0" for the product, right?

PFA and check if fits your needs

swuehl
MVP
MVP

but I don't understand , if select custname isn't should show me the sales of all customers anyway ?

because the custname= in the set analysis in the expression.

I can't see custname= in your original expression. Or are you talking about the count in the calculated dimension?

I don't think this will work like you want. And using my approach, I think you don't need the calculated dimension, a simple partname as dimension field should be enough.