Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
drwillia
Helper I
Helper I

Split Row Value by Allocation Table %

Hi,

This problem is a little beyond me, 

I would like to break each record out based on the Commodity dimension.

If that Dimension matches the allocation table then create additonal rows for each Component listed in the allocation table (currently only showing one), once each row has been created multiply the value in revenue by the allocation %

 

For example the top row is replaced by the four below it,

 

drwillia_3-1657601349864.png

 

Rebates (Summary) Table:

drwillia_0-1657600742420.png

Allocation Table:

drwillia_1-1657600810561.png

Please reach out if i have not articulated the problem well enough

Regards

Daniel

2 ACCEPTED SOLUTIONS
tamerj1
Community Champion
Community Champion

@drwillia 
Here is the sample file with the solution https://we.tl/t-Cp8LuiRxh9

1.png

Rebates (Summary) = 
SELECTCOLUMNS (
    GENERATE (
        Rebates,
        ADDCOLUMNS (
            Allocation,
            "Allocated Revenue", Rebates[Revenue] * Allocation[Allocation],
            "Allocated Component", Allocation[Component] 
        )
    ),
    "Date", [Date],
    "Branch Code", [Branch Code],
    "Company Lookup", [Company Lookup],
    "Revenue", [Allocated Revenue],
    "IBP Component", [IBP Component],
    "Source", [Source],
    "Commodity", [Allocated Component]
)

View solution in original post

tamerj1
Community Champion
Community Champion

Hi @drwillia 
Yes you are absolutely right. Here is the updated file with minor change https://we.tl/t-JjBH8gDGjW

1.png2.png

Rebates (Summary) = 
SELECTCOLUMNS (
    GENERATE (
        Rebates,
        ADDCOLUMNS (
            RELATEDTABLE ( Allocation ),
            "Allocated Revenue", Rebates[Revenue] * Allocation[Allocation],
            "Allocated Component", Allocation[Component] 
        )
    ),
    "Date", [Date],
    "Branch Code", [Branch Code],
    "Company Lookup", [Company Lookup],
    "Revenue", [Allocated Revenue],
    "IBP Component", [IBP Component],
    "Source", [Source],
    "Commodity", [Allocated Component]
)

View solution in original post

7 REPLIES 7
tamerj1
Community Champion
Community Champion

@drwillia 
Here is the sample file with the solution https://we.tl/t-Cp8LuiRxh9

1.png

Rebates (Summary) = 
SELECTCOLUMNS (
    GENERATE (
        Rebates,
        ADDCOLUMNS (
            Allocation,
            "Allocated Revenue", Rebates[Revenue] * Allocation[Allocation],
            "Allocated Component", Allocation[Component] 
        )
    ),
    "Date", [Date],
    "Branch Code", [Branch Code],
    "Company Lookup", [Company Lookup],
    "Revenue", [Allocated Revenue],
    "IBP Component", [IBP Component],
    "Source", [Source],
    "Commodity", [Allocated Component]
)

Hi @tamerj1 

 

Thanks for posting, the issue i have now is if i add components to the Allocation table it generates a combination for every component

 

CommodityComponentAllocation
(5) DTTransmission30.00%
(5) DTTorque Converter10.00%
(5) DTFinal Drive50.00%
(5) DTDifferential10.00%
(6) HYDMajor Cylinders100.00%
(9) STROther STR100.00%
(2) ENGEngines100.00%
(8) E&EOther E&E100.00%
(6) H&COther H&C100.00%
(7) F&FOther F&F100.00%
(1) UCOther UC100.00%
EMP Other EMP100.00%

 

So for (5) DT i should only generate for Transmission, Torque Converters, Final Drive & Differential but in reality it is generating for all combinations. 

 

drwillia_0-1657668589052.png

Am i making sense?

Thanks

Daniel

tamerj1
Community Champion
Community Champion

Hi @drwillia 
Yes you are absolutely right. Here is the updated file with minor change https://we.tl/t-JjBH8gDGjW

1.png2.png

Rebates (Summary) = 
SELECTCOLUMNS (
    GENERATE (
        Rebates,
        ADDCOLUMNS (
            RELATEDTABLE ( Allocation ),
            "Allocated Revenue", Rebates[Revenue] * Allocation[Allocation],
            "Allocated Component", Allocation[Component] 
        )
    ),
    "Date", [Date],
    "Branch Code", [Branch Code],
    "Company Lookup", [Company Lookup],
    "Revenue", [Allocated Revenue],
    "IBP Component", [IBP Component],
    "Source", [Source],
    "Commodity", [Allocated Component]
)

You are a master, thank you. 😀

Hi @tamerj1 im having issue downloading the file. Let me digest and come back to you, thank you.

tamerj1
Community Champion
Community Champion

Hi @drwillia 
Do dyou want to create a calculated table? Please provide copy/paste sample data

Hi @tamerj1 . 

 

This is my current code, which creates a calculated Rebates Table (see Excel attached). 

 

Rebates (Summary) =
CALCULATETABLE (
    ADDCOLUMNS (
        SUMMARIZE (
            Rebates,
            Rebates[Month],
            Rebates[Branch Code],
            Rebates[Revised Customer Name],
            Rebates[Commodity],
            Rebates[IBP Component],
            Rebates[Source]
        ),
        "Revenue"CALCULATE ( - SUM ( Rebates[Sum of Dealer Contribution] ) )
    ),
    Rebates[SOS] = "888"
)
 
The above code generates the below table
 
DateBranch CodeCompany LookupRevenueIBP ComponentSourceCommodity
Thursday, 1 October 202041001 RockhamptonCompany A-384,831.99OtherRebates(5) DT
Thursday, 1 October 202043003 Mt IsaCompany B-77.51OtherRebates(5) DT
Thursday, 1 October 202040001 Brisbane OperationsCompany B-504.26OtherRebates(5) DT
Thursday, 1 October 202040001 Brisbane OperationsCompany A346.39OtherRebates(5) DT
Thursday, 1 October 202042002 Mackay Hastings ParkCompany B-18,941.76OtherRebates(5) DT
Thursday, 1 October 202042002 Mackay Hastings ParkCompany A-263,883.13OtherRebates(5) DT
Thursday, 1 October 202042008 Mackay Connors RoadCompany B7,859.90OtherRebates(5) DT
Thursday, 1 October 202042008 Mackay Connors RoadCompany A-116,537.24OtherRebates(5) DT
Thursday, 1 October 202041001 RockhamptonCompany B-3,879.06OtherRebates(5) DT
Thursday, 1 October 202040002 ToowoombaCompany A-9,617.72OtherRebates(5) DT

 

The allocation table is below

 

CommodityComponentAllocation
(5) DTTransmission30.00%
(5) DTTorque Converter10.00%
(5) DTFinal Drive50.00%
(5) DTDifferential10.00%

 

So i just need to split out the rows into the 4 allocation components and then multiply each value by the allocation %, does this make sense?

 

Thanks

Daniel

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.