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
Mike_Mace
Resolver I
Resolver I

Monthly / weekly Percentage change

Hi all,

 

I have a table of metrics, some shown on attached snip. There are frequent new entries on table, usually weekly, can vary. Current table is an appended/grouped table so there will be more than 1 of same Date in rows. (I say this as I read about unpivoting columns which did not work for this exercise)

 

I need to show the percentage change at end of month overalls

On a second stage the percentage change between the last two entries (whenever those are) will be needed too

 

Percentage change formula as simple as it may be (X2 - X1)/X1 I don't seem to find the right DAX code to make this happen. 

(My thinking still partly works on excel's cells function and always hit a deadend)

 

Thanks in advance all. Appreciate this forum!

 

 

metricsmetrics

 

 

 

1 ACCEPTED SOLUTION
Mike_Mace
Resolver I
Resolver I

I had to change the integrals to days *28 to reach a month because data entry is per week
 
 
% change =
VAR __PREV_MONTH =
    CALCULATE(
        SUM('table'[column]),
        DATEADD('table'[Date], -28, DAY)
    )
RETURN
    DIVIDE(
        SUM('table'[column]) - __PREV_MONTH,
        __PREV_MONTH
    )

View solution in original post

1 REPLY 1
Mike_Mace
Resolver I
Resolver I

I had to change the integrals to days *28 to reach a month because data entry is per week
 
 
% change =
VAR __PREV_MONTH =
    CALCULATE(
        SUM('table'[column]),
        DATEADD('table'[Date], -28, DAY)
    )
RETURN
    DIVIDE(
        SUM('table'[column]) - __PREV_MONTH,
        __PREV_MONTH
    )

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