Dax Measure Help - Calculate with Max/min for dates

kzmanus

New Member
Joined
Feb 18, 2012
Messages
3
What I am trying to do is add a variance column (max(receiver date) - min(receive date) to obtain the number of days between 1st receive and last.

This formula is wrong =CALCULATE(MAX(MRR[Received Date]-MIN(MRR[Received Date]),ALL(MRR[Received Date]))

Any advice?

Thanks

Kevin
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
A few ideas.


  1. You might try ALL(MRR) and not just ALL(MRR[Received Date]) - if there are other fields from the MRR table on your pivot, clearing the [Received Date] filter isn't enough - you need to clear all filters. For instance if you have [Month] on your pivot, ALL(MRR[Received Date]) will still leave the [Month] filter in place, which obviously impacts [Received Date] as well.
  2. I would write this as two separate CALCULATE'S, one for the MIN and one for the MAX, and then subtracting one from the other - for me that's a stylistic concern, I doubt it is impacting your actual result, but I've never tried it your way.
  3. You might want to try FIRSTDATE and LASTDATE instead of MIN and MAX.
  4. You should check to make sure your [Received Date] column hasn't been imported as text.
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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