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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Comparison

Hi,

Just wondering if anyone could help me with a way to present my data. I think if i changed the date column to months and put in each month manually and a year column with the year beside it then it would be grand but the file i am using would be quite large this is only a small sample.

I am looking to say use some sort of formula so i can look at any month and see who the best salesperson was for that month. I realise my example is quite small but for Example in June 2015 i would see that John sold 3 and Helen and Alan sold 1 each.

I would be looking to create a bar chart and say for Example click on any month and to see who are the top selling salespeople that month.

Here is the sample Excel file.

  

SellerCompanyDate
Johneee28/03/2013
Johneee28/03/2013
Stevenqqqq29/04/2013
Michealwwww30/04/2013
Steveneeee06/07/2013
Millyrrrr01/09/2013
Racheltttt02/11/2013
Markyyy03/11/2013
Racheluuuu04/04/2014
Millyiiii05/04/2014
Johnoooo06/06/2014
johnpppp07/07/2014
Stevenaaaas08/07/2014
Peterssss09/07/2014
Pauldddd10/07/2014
Markffff11/07/2014
Tomggghhh12/07/2014
Davidhhhhhhj13/07/2014
alanjjjjjj14/07/2014
Alankkkkk15/09/2014
tomlllll16/09/2014
Davidvvvv17/11/2014
Davidbbbbb18/12/2014
Glennnnnnn01/01/2015
Roisinmmmmmeeee02/01/2015
Helendfdfssf03/01/2015
Johngregtd04/03/2015
Markgtrhuykui05/03/2015
Heleniukiuku06/03/2015
Helenkthe07/06/2015
johneretf08/06/2015
johnhfthtf09/06/2015
johnyrergd10/06/2015
Alangrreed11/06/2015

Here is the sample Excel like loaded into Qlikview. As you can see i have a dimension of Salesperson and an expression of count Company so i can see who sold the most companies.

What  i want to do is to be able to say be able to do this to see who is the top Seller for say March or any month.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

No, for you it would be a little different. Since I did not have the source data file, I had to do a partial reload to add MonthName(Date) in there. You can do something much more simpler like this:

LOAD Seller,

    Company,

    Date,

    MonthName(Date) as MonthYear

FROM

[..\..\Example.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

7 Replies
sunny_talwar

Something like this?

Capture.PNG

Not applicable
Author

Hi Sunindia,

Thanks for the reply that is exactly what i want can you explain how you changed the date to MonthYear from the way i had the date formatted if you could.

Thanks again.

sunny_talwar

There is a function in QlikView called MonthName() which changes date into Month Year format

Not applicable
Author

Hi,

I just seen the script you loaded in i pasted it below so i just paste this in when i am loading the data i presume and it changes the Date to monthyear it is that correct?

Join(Sheet1)

Add LOAD Date,

     MonthName(Date) as MonthYear

Resident Sheet1;

sunny_talwar

No, for you it would be a little different. Since I did not have the source data file, I had to do a partial reload to add MonthName(Date) in there. You can do something much more simpler like this:

LOAD Seller,

    Company,

    Date,

    MonthName(Date) as MonthYear

FROM

[..\..\Example.xlsx]

(ooxml, embedded labels, table is Sheet1);

Not applicable
Author

That worked perfect thank you saves me a great deal of time.

sunny_talwar

No problem at all

I am glad I was able to help.

Best,

Sunny