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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello experts,
I want to make my dates dynamic as per the current month.
Previously I was hard coding values as,
Example:
Solved! Go to Solution.
My suggestion is to:
1) Create a nice Calendar Table that you can connect to you "Fact" table
https://learn.microsoft.com/en-us/power-bi/guidance/model-date-tables
2) Use Time intelligence functions to calculate Sales MTD, QTD, YTD etc. Please find below and example:
Sales MTD = Calculate(
Sum(Sales_values),
DATESMTD(Date_Table[Day])
)
My suggestion is to:
1) Create a nice Calendar Table that you can connect to you "Fact" table
https://learn.microsoft.com/en-us/power-bi/guidance/model-date-tables
2) Use Time intelligence functions to calculate Sales MTD, QTD, YTD etc. Please find below and example:
Sales MTD = Calculate(
Sum(Sales_values),
DATESMTD(Date_Table[Day])
)
Thank you @Uspace87, above formula is working great for MTD calculations.
Could you please suggest the same for non mtd calculations such as below:
Fcast TPD =
VAR FcastTotalTonnes = CALCULATE(SUM('Budget'[Tonnes]), 'Budget'[Date] = DATE(2022,12,01))
VAR WDcurrentMonth = CALCULATE(AVERAGE('Budget'[WDAYS]),'Budget'[Date] = DATE(2022,12,01))
return
DIVIDE(FcastTotalTonnes,WDcurrentMonth,0)
In above formula you can see 'Budget'[Date] = DATE(2022,12,01) is the static date which we need to manually change when every new month starts.
Kindly suggest an idea to make above measure dynamic.
Thank you!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |