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

Best way to include values where no association exists

I got stuck with a model and my issue is that I have a budget and a sales table, which I would like to create associations between.

(ie. if you select a customer group or business areas you should see the sales, forecast, budget etc. )

However, my problem is that some customer groups exists in one table and not the other and vice versa. Sometimes a customer group may have a budget, but no sales, so they only exist in the budget table.

I still want the budget to show for these (but the sales figures would of course be blank). However, since the customer group does not exist at all in the Sales table, there is no association created and therefore the budget values do not show either.

I assume the only way around this is an OUTER JOIN in the SQL load statement, which would include all values from both tables. The problem is that this JOIN would be extremely resource intensive.
Is there another way around this. If anyone could you point me in the right direction it would be much appreciated.

3 Replies
Anonymous
Not applicable
Author

Can you share a simple example of what you mean? I am aware of a limitation of QV in enterprise settings where you have shared conformed dimensions but at this point I am not sure that this is the issue here.

Anonymous
Not applicable
Author

The above post should have had some explanatory text with the attached app. The model has two fact tables. Budget and Sales. It has one conformed/shared dimension called Date. Sales has a dimension called customer segment which is not related to budget.

Now filter on a customer segment and watch what happens to budget numbers. Jan 26th dissappears. This is an issue with QV. Just because there are no sales for Jan 26th does not mean there is no budget for that day!!!

sudha3295
Contributor II
Contributor II

In the UI, write your the condition using fields from both table. You will be able to replace a text for no association values without making change to script/data model.

Eg:

For below script 

TabA:
load * inline [
A, B
1, A
2, B
];

TabB:
Load * inline [
B,C
B,zzz
];

Here is the UI That replace the no association with text "Unknown" by expression :

=IF(len(C)>0 and len(B)>0,C,'Unknown')   or   use   =IF( isnull(C) and not isnull(B),'Unknown',[C])

sudha3295_1-1650880448142.png