Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
kdrees21
Helper I
Helper I

Help needed - separate value based on calculation

I have a rebate amount that I need to separate into 2 different categories. The rebate flows into one line item but I can split the rebate by the total costs for Category A and Category B. 

 

Example:

Category A Cost = $10,000

Category B Cost = $5,000

Rebate A & B = $2,500

 

I would calculate the Rebate for Category A by: $2,500 * (Category A Cost/Total Cost) 

Then Category B would be: $2,500 * (Category B Cost/Total Cost)

 

My question is how can I split the Rebate into 2 different lines:

Rebate A

Rebate B

 

Any suggestions? I'd like to be able to filter by category and show the rebate amount by category.

 

 

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi, @kdrees21 

1.Depend on your need, I create a table as below.

v-xulin-mstf_0-1608685333820.png

2.Use measure as:

Rebate =

VAR a =

    SUM ( Table1[Cost] )

VAR b =

    CALCULATE ( SUM ( 'Table1'[Cost] ), ALL ( 'Table1' ) )

RETURN

    DIVIDE ( a, b, 0 ) * 2500

 

3.Drag the columns and the measure into a table.

v-xulin-mstf_1-1608685333823.png

 

Here is the demo, please try it: Help needed - separate value based on calculation

Best Regards,

Link Chen

View solution in original post

2 REPLIES 2
v-xulin-mstf
Community Support
Community Support

Hi, @kdrees21 

1.Depend on your need, I create a table as below.

v-xulin-mstf_0-1608685333820.png

2.Use measure as:

Rebate =

VAR a =

    SUM ( Table1[Cost] )

VAR b =

    CALCULATE ( SUM ( 'Table1'[Cost] ), ALL ( 'Table1' ) )

RETURN

    DIVIDE ( a, b, 0 ) * 2500

 

3.Drag the columns and the measure into a table.

v-xulin-mstf_1-1608685333823.png

 

Here is the demo, please try it: Help needed - separate value based on calculation

Best Regards,

Link Chen

amitchandak
Super User
Super User

@kdrees21 , Looking at this data structure is not clear.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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