Partially syndicated - Outbound Splitting one table into two tables to use calculation formula for each table.

Nafa1

New Member
Joined
Nov 14, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a table on power bi and would like to split it into two tables to achieve some calculation formula. This is the look for the Main table ( Just small view of it ) :

Table A

ITEM_ID QTYU_IDACTION_DATEGROUP_IDCO_ID
019-35-005-10080.0416655Ahmed4/1/2019 5:29:42 PM10086
SP22150.004Ahmed4/1/2019 5:32:16 PM10085
004-002-008-24590.5Ahmed4/1/2019 5:34:48 PM10085
019-35-005-10080.0416655Ahmed4/1/2019 5:29:42 PM10085
033-048-060-35780.00347Ahmed4/1/2019 5:34:00 PM10086
SP32370.004Moh4/1/2019 5:32:41 PM10085
SP32370.004Moh4/1/2019 5:32:41 PM10086
001-013-000-25660.15Ahmed9/26/2018 12:00:00 AMSP22156
031-45-000-31980.08Ahmed1/12/2019 5:34:01 PMSP22156
036-000-000-32070.001Ahmed9/26/2018 12:00:00 AMSP22155
031-65-000-31920.77Ahmed8/4/2021 9:25:06 AMSP22155
001-013-000-25660.15Ahmed9/26/2018 12:00:00 AMSP22155
031-45-000-31980.08Ahmed1/12/2019 5:34:01 PMSP22155

( GROUP ID ) contains different values ( Some of them start with Number and some of them start with letters like SP for example ).

When we filter a number on ( Group_ID ) like let's say for example 1008
We see those data :

TABLE B ( Expected Result )

ITEM_IDQTYU_IDACTION_DATEGROUP_IDCO_ID
019-35-005-10080.0416655Ahmed4/1/2019 5:29:42 PM10086
SP22150.004Ahmed4/1/2019 5:32:16 PM10085
004-002-008-24590.5Ahmed4/1/2019 5:34:48 PM10085
019-35-005-10080.0416655Ahmed4/1/2019 5:29:42 PM10085
033-048-060-35780.00347Ahmed4/1/2019 5:34:00 PM10086
SP32370.004Moh4/1/2019 5:32:41 PM10085
SP32370.004Moh4/1/2019 5:32:41 PM10086

But Also , The ITEM_ID Like SP2215 can be a Group_ID too and it contains different items on it :

Table C ( Expected Result )

ITEM_IDQTYU_IDACTION_DATEGROUP_IDCO_ID
001-013-000-25660.15Ahmed9/26/2018 12:00:00 AMSP22156
031-45-000-31980.08Ahmed1/12/2019 5:34:01 PMSP22156
036-000-000-32070.001Ahmed9/26/2018 12:00:00 AMSP22155
031-65-000-31920.77Ahmed8/4/2021 9:25:06 AMSP22155
001-013-000-25660.15Ahmed9/26/2018 12:00:00 AMSP22155
031-45-000-31980.08Ahmed1/12/2019 5:34:01 PMSP22155


Note that the ( GROUP_ID ) for example ( 1008 ) have more than one ( SP ) on ( ITEM_ID ) .. Like on Group_ID 1008 , it has two ( Values starts with ( SP ) which are ( SP2215 ) and ( SP3237 ) and both can be a ( Group_ID ) and contains several ( ITEM_IDs ) .

( Group_ID ) can starts with any letter like BAK or MIXX . Not Just ( SP ).

The reason i would like to split it into two tables ( Table B and C ) is because I would like to apply a calculation formula for the values starting with a number in ( Group_ID ).

And apply another calculation formula for the items starting with letters like ( SP ).

The calculation is to see the forecasting value for each item.

Let’s say i’m going to buy 1000 Pcs from this item ( From Table B ) :

ITEM_ID QTYU_IDACTION_DATE GROUP_IDCO_ID
019-35-005-10080.0416655Ahmed4/1/2019 5:29:42 PM10086

Since the Group id Starts with number , the calculation formula will be like below :
1000 * QTY ( 0.0416655 )

But When the group id starts with letter like SP ( From Table C ) :

ITEM_IDQTYU_IDACTION_DATEGROUP_IDCO_ID
001-013-000-25660.15Ahmed9/26/2018 12:00:00 AMSP22156

the formula will be like below :

1000 * SP ( 0.004 ) ( Explained below ) * QTY ( 0.15 )

( for the SP value , it will call it from the Table B and the ITEM_ID should be related with the Group id in order to get the exact value )

ITEM_ID QTY U_IDACTION_DATE GROUP_IDCO_ID
SP22150.004Ahmed4/1/2019 5:32:16 PM10085


Here’s a google sheet link for the Original table
https://docs.google.com/spreadsheets/d/1HHNIceZxn7kX2lr_YyOxmIttgxQj57O7-wymK27HHSg/edit?usp=sharing

Here’s the PPIX file
items1.pbix

Thank you
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top