Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
mcaahmad93
Contributor
Contributor

Need to merge the date between two tables without any link into the data model.

Hi Team,

I need one help from your side. I have two tables, table 'A' and table 'B' if we load the data into data model, there should not be any link between both tables A and B. In the front end, we need  a year and month column based on year and month column both table data should be changed.

Note: I am using the below expression to combine both the data tables, but year and month is coming double time. If you have any better suggestion, please advise me. 

=Date([Sales date]) &' - '& date([Profit Date])

 

Regards,

Irshad Ansari

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Because, You are clubbing 2 fields. It will give always that only. Blindly do this to get result?

Month:=SubField(Month(date([Sales date])) &' - '& Month(Date([Profit Date])), '-' ,-1)

Year:=SubField(Year(date([Sales date])) &' - '& year(Date([Profit Date])), '-' ,-1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

5 Replies
Anil_Babu_Samineni

Perhaps this?

Date(Floor([Sales date] &' - '& [Profit Date]))

Or

Date(Date#(Floor([Sales date] &' - '& [Profit Date]), 'Your Format Here'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
mcaahmad93
Contributor
Contributor
Author

Dear Anil,

Thank you for you valuable time.

I tried your expression but it not working for me. 

I am using the below expression for month and year.

Month:=Month(date([Sales date])) &' - '& Month(Date([Profit Date]))

Year:=Year(date([Sales date])) &' - '& year(Date([Profit Date]))

And getting the Expected result like this.

clipboard_image_1.png

But i need actual result like this format for month and year which i am not getting.

clipboard_image_2.png

 

Thanks

Irshad Ansari

Anil_Babu_Samineni

Because, You are clubbing 2 fields. It will give always that only. Blindly do this to get result?

Month:=SubField(Month(date([Sales date])) &' - '& Month(Date([Profit Date])), '-' ,-1)

Year:=SubField(Year(date([Sales date])) &' - '& year(Date([Profit Date])), '-' ,-1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
mcaahmad93
Contributor
Contributor
Author

Dear Anil,

Based on your expression i am getting the output but data reflecting only one table. It should be reflect both table profit details and sales details.

clipboard_image_0.png

Regards,

Irshad Ansari

Vignesh1609
Contributor II
Contributor II

Do you have any idea in Forecast report?