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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
I am more of an excel user than DAX, so I am pretty sure a calculated column is not the way to go, but for my understand to grow I would like to see the result in a calculated column before I move this into a Measure.
I have a simple fact table that contains the following:
Date
Store ID
Product ID
Sales
I would like to add a calculated column to calculate the previous 3 months (Including the current month until the relivate date). aveage sales (Product & Site)
obviously when starting on the first date (i.e. 2016-01-01 there is no history so I am assuming that the result for that row would be the same as the acutaly sales.
Hope the above makes sence.
note, the table has 7m rows, the average sales works as a "Helper column to calculate another column.
You can create a measure with the following formula
RT Last 3 Months Sales =
CALCULATE (
SUM(Sheet[Sales]),
DATESINPERIOD (
Sheet[Date].[Date],
LASTDATE ( Sheet[Date].[Date] ),
-3,
MONTH
)
)
In this i have stored the data in Sheet.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |