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.
Hi,
I have Client, Period and Hours column. Need to calculate Net change and %Growth columns in power BI
Please help in achieving this.
Hi @Vaibhav3008 ,
Can you please try the following?
Net change =
IF(
SELECTEDVALUE( 'Table'[Client] ) =
CALCULATE(
MIN( 'Table'[Client] ),
OFFSET(
-1,
ORDERBY( 'Table'[Client], ASC, 'Table'[Period], ASC )
)
),
CALCULATE(
MIN( 'Table'[Hours] ) -
CALCULATE(
MIN( 'Table'[Hours] ),
OFFSET(
-1,
ORDERBY('Table'[Client], ASC, 'Table'[Period], ASC)
)
)
)
)
% Growth =
DIVIDE(
[Net change],
CALCULATE(
MIN( 'Table'[Hours] ),
OFFSET(
-1,
ORDERBY( 'Table'[Client], ASC, 'Table'[Period], ASC )
)
)
)
Result:
If I answered your question, please mark my post as a solution.
Best,
Thanks for the reply,
I applied it to my table and it says : Parameter is not the correct type
Can you please help resolve it
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
45 | |
28 | |
23 | |
12 | |
8 |
User | Count |
---|---|
74 | |
51 | |
45 | |
16 | |
12 |