The best solution depends somewhat on how you want to display this data, and a packaged workbook with your goal and some example data would be helpful.
But, by default, Tableau calculates measures for every combination of every member of every dimension in the view.
Example 1: You drag Date (Month) to the Columns shelf and Serial# to the Rows shelf and select COUNTD. Tableau will calculate the distinct count of serial numbers for each month.
Example 2: Add App Version to the Row shelf. Tableau will generate another set of marks for each combination of serial#, Month, and App Version. If App Version is added to the Color button, you'll get a colored line.
What gets a little complicated is totaling the rows in example 2. Tableau's Grand Totals (Analysis > Totals > Grand Totals) work by calculating the measure at a higher level of detail (as if you removed the dimensions to the left of the measure), so adding grand total in Example 2 will give you the same result as Example 1, not the sum of the rows in Example 2.
To get the sum of the rows in Example 2, you can use a table calc: Total =
IF FIRST() == 0 THEN
Make sure App Version is on the level of detail shelf and add Total. Right-click the field and select Compute Using App Version. COUNTD() will generate the counts as in Example 2 and WINDOW_SUM() will add all of the values in the App Version dimension.
Tableau will calculate this for every member of the App Version dimension. If you have three versions, you'll get three copies of the WINDOW_SUM(...), which will all be identical. The IF FIRST()==0 solves this problem by only executing the function for the first row.
I've followed your instructions. Columns show MONTH, and Rows show App Version. I added Serial # to the row shelf and selected CountD.
However, when I go and look at the raw data in Excel, the numbers don't add up. For instance, I see 50+ unique Serial #s for a certain month in Excel, while Tableau only shows ~10.