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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Adam_Cromie
Frequent Visitor

YTD Delta % with a custom start month

Hi,

 

Hoping for assistance with a query;

I need a % change/delta between the most recent month and the month at the start of the year, where the start of the year begins in September. 

The data has different org's that the delta's need to split.

 

Below is the example data and result I'm trying to create:

 
OrgPeriodTotal
100Aug-23200
100Sep-23210
100Oct-23230
100Nov-23200
100Dec-23250
100Jan-24220
200Aug-23500
200Sep-23510
200Oct-23490
200Nov-23480
200Dec-23470
200Jan-24

430

 

When reporting for Jan-24, the results should look like: 

OrgYTD Total Change
1004.8%
200-14.0%

 

Thanks in advance!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

One of ways to create solution is to have fiscal month number and fiscal year columns in the calendar table (or period table).
Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1711432511624.png

 

 

Jihwan_Kim_0-1711432478889.png

 

expected result measure: =
VAR _latestmonth =
    MAXX ( SUMMARIZE ( Data, Period[Period] ), Period[Period] )
VAR _latestfiscalmonth =
    MAXX (
        FILTER ( Period, Period[Period] = _latestmonth ),
        Period[Fiscal Month Number]
    )
VAR _fiscalyear =
    MAXX ( SUMMARIZE ( Data, Period[Fiscal Year] ), Period[Fiscal Year] )
VAR _latestvalue =
    CALCULATE (
        SUM ( Data[Total] ),
        Period[Fiscal Month Number] = _latestfiscalmonth,
        Period[Fiscal Year] = _fiscalyear
    )
VAR _firstvalue =
    CALCULATE (
        SUM ( Data[Total] ),
        Period[Fiscal Month Number] = 1,
        Period[Fiscal Year] = _fiscalyear
    )
RETURN
    DIVIDE ( _latestvalue - _firstvalue, _firstvalue )

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

One of ways to create solution is to have fiscal month number and fiscal year columns in the calendar table (or period table).
Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1711432511624.png

 

 

Jihwan_Kim_0-1711432478889.png

 

expected result measure: =
VAR _latestmonth =
    MAXX ( SUMMARIZE ( Data, Period[Period] ), Period[Period] )
VAR _latestfiscalmonth =
    MAXX (
        FILTER ( Period, Period[Period] = _latestmonth ),
        Period[Fiscal Month Number]
    )
VAR _fiscalyear =
    MAXX ( SUMMARIZE ( Data, Period[Fiscal Year] ), Period[Fiscal Year] )
VAR _latestvalue =
    CALCULATE (
        SUM ( Data[Total] ),
        Period[Fiscal Month Number] = _latestfiscalmonth,
        Period[Fiscal Year] = _fiscalyear
    )
VAR _firstvalue =
    CALCULATE (
        SUM ( Data[Total] ),
        Period[Fiscal Month Number] = 1,
        Period[Fiscal Year] = _fiscalyear
    )
RETURN
    DIVIDE ( _latestvalue - _firstvalue, _firstvalue )

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

This worked perfectly, thanks Jihwan
RossEdwards
Solution Sage
Solution Sage

I'd recommend making sure your model has a calendar table and inside that calendar table you have a "Fiscal Month" column which numerically holds the numbers 1 to 12 and a "Fiscal Year" column.  1 in your case would be September.  From here you could have a measure like the below.  Place this measure within your usual Org context with your monthly periods.

YTD Total Change = var currentFiscalYear = SELECTEDVALUE('Calendar'[Fiscal Year])
var currentResult = SUM('Data'[Total])
var firstResult = CALCULATE(
    SUM('Data'[Total]),
    ALL('Calendar'),
    FILTER(
        'Calendar'
        'Calendar'[Fiscal Year] = currentFiscalYear &&
        'Calendar'[Fiscal Month] = 1
    )
)
RETURN
DIVIDE(currentResult, firstResult)

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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