Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table Grouping by Month not working

DEPTYEARMONTHSUM(INV_AMOUNT)sum(Fre_Amount)
CDD2012Jan3252433.170
CDD2012Feb1478532.780
CDD2012Mar1657229.350
CDD2012Jan02950000
CDD2012Feb01270000
CDD2012Mar03750000

In Qlikview the first 3 rows in the above example - JAN,FEB,MAR are right alligned, the last 3 rows Left alligned.

First 3 records from database and last 3 records loaded from excel.  while loading any truncate function available to make both values similar ?

8 Replies
kedar_dandekar
Creator
Creator

Hi Jayadevan,

Generally, in QlikView the content that is right aligned is interpreted as number,

whereas left aligned content is interpreted as text.

So the Months loaded from your database are interpreted as number, whereas the months being loaded from Excel are interpreted as text 'Oct', 'Nov'.. etc.

In the script, where you load the month column from Excel, try loading your month column using the following syntax:

Month(Date#(MONTH, 'MMM')) as MONTH

This basically does the string-to-numeric conversion. Check if this works, else

please attach your excel with sample data, this would help resolve the issue ..

Also, please find attached a Technical brief on 'QlikView Date Fields' for your reference.

HTH,

KD

Not applicable
Author

I tried Date#(Month,'MMM') as Month. Still it comes right aligned.  I have given the command as follows :-

Date#(Month((INV_DATE),'MMM')    as MONTH, //Jan, Feb

Thanks.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

You've got it the wrong way round - KD suggested

Month(Date#(MONTH, 'MMM')) as MONTH

Not applicable
Author

Thanks a lot.

qlikpahadi07
Specialist
Specialist

Simply use Make date function from Back end this will resolve

kedar_dandekar
Creator
Creator

Hi Jayadevan,  Also, ensure that you apply this script logic to the month column of your EXCEL load script and not your DB load script. This script logic assumes your month data in Excel is in text MMM format e.g. 'Jan','Feb'...  Post load, the resulting format of your Excel Month field should then match with the DB Month format loaded.  - KD

Not applicable
Author

Thanks.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Please make sure you mark the correct answer to close the thread.