As 2012 is nearing its end, now's a good opportunity to look at what happened throughout the year to the stocks you follow. If you know the important things that a company achieved, as well as any challenges it failed to overcome, then you can make a better decision about whether it really deserves a spot in your portfolio.

Today, I'll look at Walgreen (WBA -0.23%). The well-known drugstore chain has had a loyal following for a long time, and dividend investors love the fact that it has found ways to increase its payout annually for decades. But a big merger in the pharmacy benefits area last year complicated things for Walgreen, and left the company with some catching up to do. Below, you'll find more on what moved shares of Walgreen this year.

Stats on Walgreen

  

Year-to-date stock return

13.6%

Market cap

$34.5 billion

Revenue, past 12 months

$71.6 billion

Net Income, past 12 months

$2.13 billion

1-year revenue growth

(0.8%)

1-year net income growth

(21.6%)

Dividend yield

3%

CAPS rating

****

Source: S&P Capital IQ.

What pushed Walgreen shares up this year?
Walgreen has a long history of providing shareholder value to investors. With a long track record of dividend increases, Walgreen qualifies as a Dividend Aristocrat, and with dividend stocks in great demand lately, Walgreen has definitely felt the upward push in its shares.

But, operationally, Walgreen hasn't done as well as its stock would suggest. During a long period in which customers who use Express Scripts (ESRX) as a pharmacy benefit manager weren't able to use Walgreen to fill their prescriptions, the company saw substantial customer defections to rivals CVS Caremark (CVS 1.15%) and Rite Aid (RAD 5.26%).

Once the Express Scripts problems got resolved, Walgreen has seen some improvement. Despite a scary headline earnings drop of 55%, Walgreen posted record numbers for free cash flow in fiscal 2012. Those numbers support the dividend, which the company raised by 22% in August.

Still, things aren't going perfectly for Walgreen. In October, Walgreen's same-store sales dropped 2.1%, and it followed up that performance with an even weaker 6.2% drop in November, bringing its total fiscal first-quarter drop to 7.7%. That shows that Walgreen hasn't gotten all its customers back from Rite Aid, CVS, and other prescription services.

The year 2012 has had its challenges for Walgreen but, looking forward, the company needs to do its best to woo back the customers it lost during the Express Scripts fiasco. How well it does will define its future next year and beyond.

Click here to add Walgreen to My Watchlist, which can find all of our Foolish analysis on it and all your other stocks.