Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
Current have a table called ProductCosts with the following data:
What I am trying to achieve is that I take the last month total amortized cost and multiply this by 12 to calculate the run rate for the year.
EG
Today would be year 2022, month 12, total amortized cost * 12
When we come into Feburary then it would be year 2023, month 1, total amortized cost * 12
When we come into March then it would be year 2023, month 2, total amortized cost * 12
I know this works =
Solved! Go to Solution.
I managed to figure this out by building 2 measures to check the month - 1 and get the year, then used this as a filter within the DAX
@Begbie , with help from date table you can get last month measure
example measures
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
I do have a dates talble, see below:
But when I try changing your query to suit what I need, all it is doing is returning the wrong values unfortuantely
I managed to figure this out by building 2 measures to check the month - 1 and get the year, then used this as a filter within the DAX
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |