Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 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.
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.
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!
Solved! Go to Solution.
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
)
)
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 I will create one for sure. Just started establishing the approach. Have never done such calculations and stuck on it.
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
)
)
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.
@Anonymous Do you already have a Calendar table in your model?
If not, you'll probably need to have one.
User | Count |
---|---|
119 | |
65 | |
62 | |
56 | |
50 |
User | Count |
---|---|
177 | |
84 | |
70 | |
64 | |
54 |