Changing units in a DateListPlot

I asked Notebook Assistant to make a nice plot of the United States population from 2014 to 2023 with population in millions. I’d appreciate help with coding to accomplish this. Notebook Assistant generated code that does not work:

usPopulationData=CountryData["UnitedStates",{"Population",{2014,2023}}];
usPopulationDataM=usPopulationData /. Quantity[v_,"People"]:>Quantity[v/1000000,"People"];
DateListPlot[
    usPopulationDataM,
    Joined->True,
    PlotTheme->"Scientific",
    Filling->Axis,
    PlotLabel->Style["U.S. Population from 2014 to 2023",Bold,FontColor->DarkBlue,FontSize->16],
    Frame->True,
    FrameStyle->Directive[FontSize->12,Bold],        FrameLabel->{Style["Year",Bold,DarkBlue,12],Style["Population (Millions)",Bold,DarkBlue,12]},
    GridLines->Automatic,
    GridLinesStyle->Directive[Dashed,Gray],
    PlotStyle->Directive[Thick,Red],
    ImageSize->Large
]

The biggest problem is that the calculation of usPopulationDataM doesn’t work. In fact,
usPopulationDataM == usPopulationData
returns True.
For details about the code and its problems, see attached file NotebookAssitantIssues_GDorfman_11jul25.nb .

NotebookAssitantIssues_GDorfman_11jul25.nb (67.8 KB)

If you try usPopulationData // InputForm you will see that Quantity does not appear inside, but rather QuantityArray. You can try this:

UnitConvert[usPopulationData, "Mega"*"People"]

Gianluca, Thanks. That worked. There was one other, minor problem, which I fixed by changing DarkBlue to Blue. I also changed ImageSize to Medium. The result is in attached file NotebookAssitantIssues_GDorfman_12jul25.nb , which is the same as the file I provided yesterday but has a new Subsection called “Modified Code”.

NotebookAssitantIssues_GDorfman_12jul25.nb (95.9 KB)