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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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,216,005
Messages
6,128,231
Members
449,435
Latest member
Jahmia0616

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