Forum Discussion
Krissha
4 years agoFrequent Visitor
HELP: PROCUREMENT REBATES CALCULATION
Hi power user, Could you please help me on my powerbi. I'm a newbie user, I'm creating a procurement spend report and I want to show the actual rebates % and actual rebates amount based on a reb...
- Anonymous4 years ago
Hi Krissha ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
Method 1: Create measures
Actual rebates % = CALCULATE ( MAX ( 'Rebates Structure'[Rebates %] ), FILTER ( ALL ( 'Rebates Structure' ), 'Rebates Structure'[Minimum Amount] <= MIN ( 'Append Spend Supplier Details'[USD Spend] ) && IF ( IFERROR ( SEARCH ( "and above", 'Rebates Structure'[Maximum Amount] ), 0 ) > 0, 1 = 1, VALUE ( 'Rebates Structure'[Maximum Amount] ) >= MIN ( 'Append Spend Supplier Details'[USD Spend] ) ) ) )Actual rebates amount = SELECTEDVALUE('Append Spend Supplier Details'[USD Spend])*[Actual rebates %]Method 2: Create calculated columns
Column_Actual rebates % = CALCULATE ( MAX ( 'Rebates Structure'[Rebates %] ), FILTER ( ALL ( 'Rebates Structure' ), 'Rebates Structure'[Minimum Amount] <= 'Append Spend Supplier Details'[USD Spend] && IF ( IFERROR ( SEARCH ( "and above", 'Rebates Structure'[Maximum Amount] ), 0 ) > 0, 1 = 1, VALUE ( 'Rebates Structure'[Maximum Amount] ) >= 'Append Spend Supplier Details'[USD Spend] ) ) )Column_Actual rebates amount = 'Append Spend Supplier Details'[USD Spend]*'Append Spend Supplier Details'[Column_Actual rebates %]Best Regards
Anonymous
4 years agoNot applicable
Hi Krissha ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
Method 1: Create measures
Actual rebates % =
CALCULATE (
MAX ( 'Rebates Structure'[Rebates %] ),
FILTER (
ALL ( 'Rebates Structure' ),
'Rebates Structure'[Minimum Amount]
<= MIN ( 'Append Spend Supplier Details'[USD Spend] )
&& IF (
IFERROR ( SEARCH ( "and above", 'Rebates Structure'[Maximum Amount] ), 0 ) > 0,
1 = 1,
VALUE ( 'Rebates Structure'[Maximum Amount] )
>= MIN ( 'Append Spend Supplier Details'[USD Spend] )
)
)
)Actual rebates amount = SELECTEDVALUE('Append Spend Supplier Details'[USD Spend])*[Actual rebates %]
Method 2: Create calculated columns
Column_Actual rebates % =
CALCULATE (
MAX ( 'Rebates Structure'[Rebates %] ),
FILTER (
ALL ( 'Rebates Structure' ),
'Rebates Structure'[Minimum Amount]
<= 'Append Spend Supplier Details'[USD Spend]
&& IF (
IFERROR ( SEARCH ( "and above", 'Rebates Structure'[Maximum Amount] ), 0 ) > 0,
1 = 1,
VALUE ( 'Rebates Structure'[Maximum Amount] )
>= 'Append Spend Supplier Details'[USD Spend]
)
)
)Column_Actual rebates amount = 'Append Spend Supplier Details'[USD Spend]*'Append Spend Supplier Details'[Column_Actual rebates %]
Best Regards
- Krissha4 years agoFrequent Visitor
This works for me. super Thank you