Reply
avatar user
Anonymous
Not applicable
Partially syndicated - Outbound

Analyze Performance Drop From Selected Period Compare to Previous

Dear Community,

I have a trend that shows every project KPI performance like below.

 

My idea is to find a strange KPI behavior in time so I need 2 measures:

1. To find if a project has ever had a drop over 30% in a period of a month compared to the previous available month.

2. After filtering a month to be able to see if a project has ever had a drop over 30% compared to the previous available month.
Снимок.PNGСнимок2.PNG
The problem is that periods may vary and each month is not always available for a project.

I hope to use that logic to add different info in the future like "What was the project name that had the drop", "What was the month when the drop happened", "What was the exact deviation", etc.

Thank you very much for any help! 

1 ACCEPTED SOLUTION

Syndicated - Outbound

Hi @Anonymous ,

 

Try the following formula:

 

% Compare to Previous = 
var Pre_AV_M = 
    MAXX(
        FILTER(
            ALL('Table'),
            'Table'[ProjectID] = MAX('Table'[ProjectID]) 
            && 'Table'[MonthNum] < MAX('Table'[MonthNum])
        ),
        'Table'[MonthNum]
    )
var Pre_Value = 
    CALCULATE( 
        SUM('Table'[KPI]), 
        FILTER(
            ALL('Table'),
            'Table'[ProjectID] = MAX('Table'[ProjectID])
            && 'Table'[MonthNum] = Pre_AV_M
        )
    )
return
    IF(
        Pre_Value <> BLANK(), 
        DIVIDE(
            SUM('Table'[KPI]),
            Pre_Value
        ) - 1
    )
Over30% ID Count = 
CALCULATE(
    DISTINCTCOUNT('Table'[ProjectID]),
    FILTER(
        ALLEXCEPT( 'Table', 'Table'[Date], 'Table'[ProjectID] ),
        [% Compare to Previous] < -0.3
    )
)

vkkfmsft_0-1629708067746.png

vkkfmsft_1-1629708090272.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

3 REPLIES 3
avatar user
Anonymous
Not applicable

Syndicated - Outbound

@m3tr01d I will create one for sure. Just started establishing the approach. Have never done such calculations and stuck on it.

Syndicated - Outbound

Hi @Anonymous ,

 

Try the following formula:

 

% Compare to Previous = 
var Pre_AV_M = 
    MAXX(
        FILTER(
            ALL('Table'),
            'Table'[ProjectID] = MAX('Table'[ProjectID]) 
            && 'Table'[MonthNum] < MAX('Table'[MonthNum])
        ),
        'Table'[MonthNum]
    )
var Pre_Value = 
    CALCULATE( 
        SUM('Table'[KPI]), 
        FILTER(
            ALL('Table'),
            'Table'[ProjectID] = MAX('Table'[ProjectID])
            && 'Table'[MonthNum] = Pre_AV_M
        )
    )
return
    IF(
        Pre_Value <> BLANK(), 
        DIVIDE(
            SUM('Table'[KPI]),
            Pre_Value
        ) - 1
    )
Over30% ID Count = 
CALCULATE(
    DISTINCTCOUNT('Table'[ProjectID]),
    FILTER(
        ALLEXCEPT( 'Table', 'Table'[Date], 'Table'[ProjectID] ),
        [% Compare to Previous] < -0.3
    )
)

vkkfmsft_0-1629708067746.png

vkkfmsft_1-1629708090272.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

m3tr01d
Continued Contributor
Continued Contributor

Syndicated - Outbound

@Anonymous Do you already have a Calendar table in your model?

If not, you'll probably need to have one.

avatar user

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 MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)