Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I wish to get a sum for the values correlating for each month. Looking at the example table below, I am given a series of dates and units sold for a series of products:
Product | Date | Units Sold | Monthly Sales |
Hat | May 1, 2023 | 21 | 29 |
Hat | May 1, 2023 | 8 | 29 |
Shirt | May 1, 2023 | 1 | 1 |
Shirt | April 1, 2023 | 3 | 8 |
Shirt | April 1, 2023 | 5 | 8 |
Shirt | March 1, 2023 | 14 | 14 |
Pants | March 1, 2023 | 4 | 4 |
The monthly sales needs to somehow add the values in the unit sold column based on the date and product column.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Monthly sales total: =
VAR _t =
ADDCOLUMNS (
SUMMARIZE ( Sales, 'Product'[Product], 'Date'[Date] ),
"@unitsold", CALCULATE ( SUM ( Sales[Units Sold] ) ),
"@salesprice", CALCULATE ( SUM ( 'Product Sales'[Monthly Sales] ) )
)
RETURN
SUMX ( _t, [@unitsold] * [@salesprice] )