Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
marishnagendran
Creator
Creator

Set Expression based on dimension

Dear All,

 Fact Table  
      
NoCustomer_NumSourceBranchSalesDelay Reason
      
1AsalesBranch 120 
2BsalesBranch 110 
3CsalesBranch 120 
4AsalesBranch 110 
      
1AStockbranch 1-Delivered
2BStockbranch 1-Delivered
3CStockbranch 1-Delay
4AStockbranch 1-Not Delivered
      

 

The above is my data model.It contains Sales and Stock fact table concatenate into 1 fact table.

In table chart 

  1. Manual No
  2. Customer Num
  3. Branch
  4. No.of.Sales (Measure)

In above table chart i need to add the Delay reason as a 5th column based on Manual No.

Whether it is possible or not???

Labels (4)
8 Replies
frederikverhaeghe
Contributor II
Contributor II

hello,

 could you share your load script?

 

marishnagendran
Creator
Creator
Author

Thanks for your response.

It contains too many fields and also confidential.

But it is the requirement?? Do you have any doubts on this???

frederikverhaeghe
Contributor II
Contributor II

NoCustomer_NumSourceBranchSalesDelay Reason

 

Do I understand it correctly that you have a sales table, containing

  • No
  • Customer_Num
  • Branch
  • Sales

and a stock table containing

  • No
  • Customer_Num
  • Branch
  • Delay reason

?

 

marishnagendran
Creator
Creator
Author

Yeah Correct!!!!

frederikverhaeghe
Contributor II
Contributor II

Assuming No. is the unique identifying field, I would try the following:

load No, Customer_Num, Branch, Sales

from sales_table

 

load No,  Delay reason

from stock_table

 

what do you think?

marishnagendran
Creator
Creator
Author

I'm already done data modelling.Just see my first post

I need output like,

Manual NoCustomer NumberBranchSum of SalesDelay Reason
     
1ABranch 120Delivered
2BBranch 110Delivered
3CBranch 120Delay
4ABranch 110Not Delivered

 

Manual no is unique for Sales and Stock table

It is possible???

robert99
Specialist III
Specialist III

"Is it possible"

It is

Its best to do this in script though as explained above.

But if this is not possible

Set up a table using

  • Dimensions = loadNo, Customer_Num, Branch
  • a  measure where Sum ({< Source = {Sales}>} Sales)
  • an aggr statement >> aggr( delayreason   ,loadNo)

You can restrict delayreason by using set analysis (I think)

Aggr({<Source  = {Stock}>}  delayreason   ,loadNo)

 

 

 

 

marishnagendran
Creator
Creator
Author

I tried AGGR function but it is not working