Our aim is to create a new table out of two following tables.
Table 1 / Date Table
Table 2 / Fact Table
As we would like to calculate the standard deviation per item, we desire to create a table which contains the amount per item and year-month for items with no amount we need Zero Values per year-month.
Thanks for providing the sample data in PBIX, that’s very helpful.
This sounds like a job for Power Query! I created a distinct list of Item Numbers, then added the Year-Month column from the Dates table for each and Merged that with the Fact table. The M code for the new Combined data query looks like this: