# DAX formula to get multiple min-max values on multiple inputs

#### Buhloit

##### New Member
Greetings,
I'm a big fan of Power Pivot, I struggle on 1 point, even after having read Rob's book on DAX, I can't solve my problem.

I used to calculate my KPIs using vlookups and pivot tables.
One of the data I used:

Raw data (Sheet1):
 Job Date 1223 03/04 1223 05/04 1223 06/04 2334 02/04 5698 01/04 ....

<tbody>
</tbody>

PivotChart (Sheet2):
 Job Start date End date 1223 03/04 06/04 2334 02/04 ... 5698 01/04 ...

<tbody>
</tbody>

Summary Sheet (Sheet3):
 Job Content (vlookup sheet x) Shopfloor (vlookup sheet x) Start date (Vlookup sheet2) End date (vlookup sheet2) article number (vlookup sheet x) Planned start date (vlookup sheet x).... .... ... .... 1223 03/04 06/04 ....

<tbody>
</tbody>

Then I do many pivot table with calculated fields to get my KPIs.

My problem:
How do you get the start date and the end date sorted out from sheet 1 using PowerPivot?
I can't figure the DAX formula to use.

Regards

Buhlo

### Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use \$ signs: \$V\$2:\$Z\$99 will always point to V2:Z99, even after copying
Buhlo, welcome to the forum!

Unless I'm missing something I suspect you are just trying to over complicate things.

Code:
``````[Min] = MIN(data[Date])
[Max] = MAX(data[Date])``````

Once you pull the 'Job' into into the row header that creates the filter context for each row and you will automatically get the Min/Max date for each Job from the data table.

HTH
Jacob

Hello Jacob,
I was indeed over complicating things!
Buhlo

So how would you find the minimum date used in a related fact table? - regardless of measure?

Replies
0
Views
150
Replies
3
Views
127
Replies
2
Views
2K
Replies
5
Views
4K
Replies
0
Views
255

1,196,509
Messages
6,015,618
Members
441,908
Latest member
Guitar1st

### 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.

### Which adblocker are you using?

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

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