Maximum Miles (Power BI)

cwar82

New Member
Joined
Mar 3, 2019
Messages
1
Hi - hope you can help

I have two tables.

A fact table - Table 1

BCD
6DateBooking NumberPost Code
701/03/2019578908GH
801/03/2019578908DG
901/03/2019456782PH
1002/03/2019689053DG
1102/03/2019689053PH
1202/03/2019689053SE

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1



A dim table - Table 2

FG
6Post CodeMiles
7GH20
8DG30
9PH40
10SE70
11TS60

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1



They are joined together using the Post Code Column.

I'm wanting to create a measure that will display as a new column in a table visual of the fact table. I want it to look like the below:

IJKL
6DateBooking NumberPost CodeMaximum Miles
701/03/2019578908GH30
801/03/2019578908DG30
901/03/2019456782PH40
1002/03/2019689053DG70
1102/03/2019689053PH70
1202/03/2019689053SE70

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1



This column (measure) shows the maximum (highest) mileage for any given Booking Number based on the Post Codes associated with that booking. As an example booking number 689053 has three post codes associated with it - the one with the highest miles is SE at 70 miles - so in the maximum miles column it says 70 for all of the 689053 booking numbers.

Please could you help me with a measure as I'm stumped.

I hope this makes sense.

Kind regards

Chris
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,213,534
Messages
6,114,186
Members
448,554
Latest member
Gleisner2

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