Measure (or Calculated Column) to Restate Second Measure

ExcelingInLife

New Member
Joined
May 1, 2020
Messages
7
Thanks in advance. Title may be confusing but essentially I'm looking to calculate days past due. In power pivot I am taking Today()-Due Date to calculate the days. However, I want to be able to look at it historically. Any thoughts how I could connect a selected value from the calendar it is connected to (call it Calendar[Date])? Essentially if select 9/1/2019 I want to do 9/1/2019 - Due Date.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi,

You won't be able to use a Calculated Column as these do not respond to the slicers or selections.

As for the measure, you can try the following formula -
Rich (BB code):
Date Diff = 
    DATEDIFF(MAX('Calendar'[Date]), MAX(tbl_DueDate[Due Date]), DAY)

Here's an exemplary result -
1589378738716.png
 
Upvote 0
Hi,

You won't be able to use a Calculated Column as these do not respond to the slicers or selections.

As for the measure, you can try the following formula -
Rich (BB code):
Date Diff =
    DATEDIFF(MAX('Calendar'[Date]), MAX(tbl_DueDate[Due Date]), DAY)

Here's an exemplary result -
View attachment 13783
Appreciate the help. No luck on this. Perhaps because my calendar is built to be from 2016-2024 for flexibility? Tried it with selectedvalue but no luck either
 
Upvote 0
Thanks for the update - the calendar range shouldn't be the issue.

Could you do me a favor and add the measure to your table, but split it into two parts -
First, test what is the result of Date Diff = MAX('Calendar'[Date]) - does it always return the selected Calendar Date for each row?
Second, test what is the result of Date Diff = MAX(tbl_DueDate[Due Date]) - does it always return the same date as "Due Date" column in the same table?

Any screenshots you can provide will be also helpful.
 
Upvote 0

Forum statistics

Threads
1,223,793
Messages
6,174,626
Members
452,575
Latest member
Fstick546

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