Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RobThrive
Resolver I
Resolver I

Showing last 12 month growth over existing portfolio

Hi,

I've pulled in a single date column called build_dates from SQL.

This is a record of all the properties/assets on our portfolio and goes well back into the 1900's.

 

I'm trying to figure out how to write a DAX formula that will show the last 12 months (of when the report was run) portfolio growth, month by month to put into a line chart. For example I have it in my head the following steps:

 

  1. Count the number of assets in the portfolio that is older than 12 months from today (store this in a variable maybe?)
  2. Count the number of assets built during the month of 12 months ago and add this to the existing portfolio number
  3. Same as step 2, but include the month of 11 months back as well
  4. Same as step 3, but include month of 10 months back as well.

But I'm not understanding how to program this, without effectively making 12-13 individual calculations. 0_o.

I have a DateTable created that I join to this import. This datetable has the calendarDate, Month, Year and various other columns often found in a DT.

 

Should I be using a YTD function maybe?

One of the things that has confused me, is that I was looking to use DATEADD() like you would in SQL. But it appears you cannot use DATEADD(TODAY(),n,x) to work out 12/11/10 months back from today.

Any guidance would be much appreciated please.

 

Thanks.

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors