cancel
Showing results 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.

Helper I

## Percentage change analysis per item

Take the example below, how do i compute the percentage change of client loan amount for each client ID from one cycle of loan to the next cycle.

 Client ID Cycle of loan Loan Amount X 1 200 X 2 450 R 1 20,000 R 2 4,500 R 3 34,000
2 ACCEPTED SOLUTIONS
Super User
Community Support

You can try the following methods.
Measure:

``````Previous Amount =
VAR _N1 = MAXX (FILTER (ALL ( 'Table' ),
[Cycle of loan] < SELECTEDVALUE ( 'Table'[Cycle of loan] )
&& [Client ID] = SELECTEDVALUE ( 'Table'[Client ID] )
),[Cycle of loan])
Var _N2=CALCULATE (SUM ( 'Table'[Loan Amount] ),
FILTER (ALL ( 'Table' ),
[Client ID] = SELECTEDVALUE ( 'Table'[Client ID] )
&& [Cycle of loan] = _N1))
Return
IF(_N2=BLANK(),0,_N2)``````
``````Measure =
IF ([Previous Amount] = BLANK (),BLANK (),
DIVIDE ([Previous Amount] - SUM ( 'Table'[Loan Amount] ),SUM ( 'Table'[Loan Amount] )))``````

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

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

2 REPLIES 2
Community Support

You can try the following methods.
Measure:

``````Previous Amount =
VAR _N1 = MAXX (FILTER (ALL ( 'Table' ),
[Cycle of loan] < SELECTEDVALUE ( 'Table'[Cycle of loan] )
&& [Client ID] = SELECTEDVALUE ( 'Table'[Client ID] )
),[Cycle of loan])
Var _N2=CALCULATE (SUM ( 'Table'[Loan Amount] ),
FILTER (ALL ( 'Table' ),
[Client ID] = SELECTEDVALUE ( 'Table'[Client ID] )
&& [Cycle of loan] = _N1))
Return
IF(_N2=BLANK(),0,_N2)``````
``````Measure =
IF ([Previous Amount] = BLANK (),BLANK (),
DIVIDE ([Previous Amount] - SUM ( 'Table'[Loan Amount] ),SUM ( 'Table'[Loan Amount] )))``````

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

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

Super User

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors