Price Range - PowerPivot

tusharmehta

New Member
Joined
May 12, 2014
Messages
34
Hello Everyone,

I herewith posting one example in which I have two tables:

1 Transaction table
2 Range Table

Transaction TableRange Table
Sr. NoProductAmountRangeRangeStartEnd
1Pr1100??0-1000100
2Pr2200??101-200101200
3Pr3150??201-300201300
4Pr4110??301-400301400
5Pr5300??401-500401500
6Pr6450??501-600501600
7Pr7122??601-700601700
8Pr81000??701-800701800
9Pr9232??801-900801900
10Pr10265??901-10009011000
1001-110010011100
1101-120011011200
1201-130012011300

<tbody>
</tbody>

My questions is how to fill the Range from Range table to Transaction table automatically using PowerPivot calculate or other functions?

Thanks in Advance.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi Tusharmehta,

I have a alternative Power Query solution to your problem. Here are the steps

1. Load the Transaction table to Power Query.
a. Create a Blank Query using formula:
=Excel.CurrentWorkbook() or
b. Create new workbook and import the Transaction table to Power Query

2. Insert a Modulo with Amount of 100 using the formula:
=Table.AddColumn(#"Expanded Content", "Modulo", each Number.Mod([Amount], 100), type number)

3. Insert an Integer-Division with Amount of 100 using the formula:
=Table.AddColumn(#"Expanded Content", "Modulo", each Number.Mod([Amount], 100), type number)

4. Create a Lower band with the formula:
=Table.AddColumn(#"Expanded Content", "Modulo", each Number.Mod([Amount], 100), type number)

5. Create Upper band with the formular:
= Table.AddColumn(#"Lower Band", "Upper Band", each if [Modulo] > 0 then ([#"Integer-Division"]+1)*100 else [#"Integer-Division"]*100)

6. Create your band with the formular:
= Table.AddColumn(#"Upper Band", "Band", each Text.From([Lower Band]) & "-" & Text.From([Upper Band]))

Hope this helps
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,315
Members
448,886
Latest member
GBCTeacher

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