Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date in the scrept

I need to suit the dates in the 3 tables so that i will have the ability to make sales Comparison between the 3 tables : sales, sales history and budget.

the comparison between sales vs sales history should be made on a daily and the comparison sales vs budget should be made on a monthly.

the budget table is budget 2010.

In addition, how can i cancel the loops between the tables by keys table?

7 Replies
Anonymous
Not applicable
Author

Alon

Firstly rename 2 of the fields called SALES to say:

  • [HistoricalSales]
  • [BudgetSales]
  • [Sales]

That will eliminate the unwanted joins you have.

Then you probably need to add a Master Calendar, as per page 5 of this pdf Generating missing data.pdf

I expect you;ll need to change all you date filed names to the same name to join on them and onto the Calendar.

Your budget is at the Month level so that is level you need to do yo comparisons at.

Best Regards,     Bill

Not applicable
Author

you can create the Date_Link table having all the data fields with Fact table name.

sujeetsingh
Master III
Master III

Alon,

Your data model is good here are some suggestions from my side :

---You are using sales as Key to join all ,is it right because it may be that on two different dates there is same sales

---use joins to append the two tables

---use dates as key they will be better .

Not applicable
Author

how can i suit the dates in the 3 tables?

sujeetsingh
Master III
Master III

Ok then it means you are not having any Key

Not applicable
Author

Can you tel me pleas how can i suit the dates in the 3 tables?

Not applicable
Author

Hi alon,

when you want to compare sales present in sales, sales history and budget tables rename those sales fileds as sales and sales_budget and sales_history respectively and link all the tables using dates column you can create date as link_date and month(date) as link moth in sales table  and use link_date as key between sales and sales history and use link_month as key between sales and sales_budget. Then the loops will not be formed.

Regards,

Abhishek