“Chalk it up to experience”

“Chalk it all up to experience” is what is sometimes said after a loss. Chalk boards were used in sports to keep score, but it is not clear if the expression comes from sports. “Chalk it all up to experience” has been cited in print since at least 1906
 
A similar saying about experience is “Experience is what you get when you didn’t get what you wanted.”
 
     
(Oxford English Dictionary)
chalk, v.
spec. To write up in chalk (a record, esp. of credits given); to score. Hence to chalk it: to run up a score, take ‘tick’. Now esp. common in phr. to chalk it up (to), to charge it (to) (a person, an account, experience, etc.)
1953 W. P. McGivern Big Heat vi. 82   Well, we can chalk it up to experience.
 
Chronicling America
26 March 1906, Evening Bulletin (Honolulu, HI), “Sports,” pg. 6, col. 3:
The D. H. should chalk it all up to experience and the next time there is a meet they should have some voice in the matter of choosing officials.
 
3 January 1917, Fort Wayne (IN) Daily News, pg. 16, col. 2:
The city council should reject the expense claim and let the junketers chalk it up to experience.
 
Google Books
The Glory Hole
By Stewart Edward White
New York, NY: Doubleday, Page & Company
1924
Pg. 206:
“It never works out in the long run. But you’ve found that out. The only thing I can advise you, Freeman, is to take your medicine and chalk it up to experience.”
 
7 July 1926, Marshall (MI) Evening Chronicle, “To the Bridge Fiend” (poem), pg. 4, col. 2:
Chalk it all up to experience.
 
21 April 1927, Salt Lake Tribune (Salt Lake City, UT), pg. 2, col. 5 ad:
We Misjudged Our Market on These Men’s Suits
(...)
We’ve got to sell them and take our loss. We’ll chalk it up to experience.
(Utah Woolen Mills—ed.)
 
14 August 1938, Dallas (TX) Morning News, “Man’s Sure-Fire Conversation Line Offered Woman Who Is Stalking Male,” sec. 3, pg. 9, col. 2:
If you discover in the meantime that he’s not as interested as that decorative facade led you to believe, just chalk it up to experience.
 
Google News Archive
28 January 1956, Miami (FL) News, “Pastrano And Spieser May Fight Here Again,”  pg. 1B, col. 4:
“Chalk it up to experience, I guess. I’ll get him next time.”
 
Google News Archive
21 November 1958, Sarasota (FL) Journal, “Dear Abby” with Abigail Van Buren, pg. 10, col. 2:
Abby, don’t tell me to chalk it up to experience and forget about it, because I can not afford lo forget about $450 in cash.
 
OCLC WorldCat record
Chalk it up to experience
Author: Dick Samek
Publisher: Doubleview, W.A. : D. Samek, 1994.
Edition/Format:   Book : Biography : English
 
OCLC WorldCat record
Chalk it up to experience.
Author: M Jones
Edition/Format:   Article : English
Publication: Radiologic technology, 2000 Sep-Oct; 72(1): 61-2
Database: From MEDLINE®/PubMed®, a database of the U.S. National Library of Medicine.