Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue after concatenating

Dear All

I have two tables  Table1- Sales and Table2- Outstanding.   I have concatenated both tables.

Both have Date field of their own.

The Sales table field--->  YearMonth  is linked to calendar.  I am given alias YearMonth to date field of Outstanding.

I am trying to create a report which has to show both Sales and Outstanding amounts for the previous month.

For which I use variable in Set analysis as  vPrevmonth.

Variable is defined as below:

vPrevmonth = Date(addmonths(max([MonthYear]), -1), 'MMM-YYYY')  .

However I do not get the desired result for Sales and Outstanding. The output works for only one field either Sales or Outstanding.

Not for both.

Is there any modification required?  Kindly help.

Thanks & Regards

Chintan Gala

1 Solution

Accepted Solutions
sunny_talwar

I think QlikView is not able to interpret your MonthYear field within the Fact table. You will need to use Date#() to help qlikview understand your MonthYear field and then you can use your own formatting. Lets say MonthYear looks like this

MM/YYYY

Date(MonthStart(Date#([MonthYear]), 'MM/YYYY')), 'MMM-YYYY') as OS_MY,

Now I don't have source data file, so don't really know how MonthYear looks like, but if you can reload the application once again with MonthYear field in your Fact table, I might be able to see how it looks like.

Capture.PNG

Also, read these

Why don’t my dates work?

QlikView Date fields

Get the Dates Right

View solution in original post

23 Replies
sunny_talwar

Would you be able to share a sample to show the issue?

petter
Partner - Champion III
Partner - Champion III

Without any sample data including a sample application it is only possible to give you general pointers to something that will help you:

Your problems seems to stem from having so-called role playing dimensions. You have a date that plays two roles one for sales and one for outstanding.

To solve this you should have a look at this information:

Canonical Date

and/or this:

Why You sometimes should Load a Master Table several times

Anonymous
Not applicable
Author

Hello Sunny

I will try to attach a sample app after debugging with few records.

Till then I will summarize the issue in short:

Table 1  Sales:

Load A,B,C.....

        Date(MonthYear,'MMM-YYYY') as MY

from. source......;

Calender:

Load A,B,C...

  Date(MonthYeat,'MMM-YYYY')    as MY

from source;..........

concatenate(Table1)

Table2:  Outstanding

Load A,B,C

Date(outstandingdare,'MMM-YYYY') as MY

from source;

Then while making report values come in Sales but in OS it comes 0

Thanks & Regards

Chintan

sunny_talwar

That is kind of strange, but once you are able to share a sample, it might be easier to pin point the issue

Anonymous
Not applicable
Author

Hello Sunny/Friends

Only the front end of Final app with single report having the expressions used and the script of app enough?

Thanks & Regards

Chintan Gala

sunny_talwar

To see what your issue is, those things should be enough. I don't know if we have to reload the app (hopefully not), then we might need the source data if possible

Anonymous
Not applicable
Author

Correct.

Anonymous
Not applicable
Author

Hello Sunny

I have attached the qvw.

Thanks & Regards

Chintan Gala

sunny_talwar

Try this in your script:

Date(MonthStart(MonthYear),'MMM-YYYY') as OS_MY,

and then reload the application and the problem should fix (I think)