Limit Date Dimension

m1nkeh

New Member
Joined
Jul 28, 2014
Messages
30
Hi,

I have a measure as follows:

Code:
SimpleCalc :=CALCULATE (
    SUM ( [Premium] ),
    FILTER ( ALL ( Dates ), Dates[Date] <= MAX ( Dates[Date] ) )
)

But what this ends up doing is taking the final value an running it right to the end of the date dimension... whereas technically this is right, it's a pain in the backside because my date dim is many years in the future..

how can i limit the date dimension to only show up to something more reasonable... i'm not massively fussed if it's the current day, or perhaps month, or even perhaps year...

just not running off into the future infinitely would be nice ;)

cheers!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
got there in the end... this seemed to do the trick:

Code:
Test := IF ( MIN ( 'Dates'[Date] ) <= TODAY(), 1 )

does what i need anyway..

i also changed 'all dates' in the first post to:

Code:
DATESBETWEEN(Dates[Date], BLANK(), TODAY())

just in case that mattered... other suggestions are welcome.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,071
Messages
6,176,201
Members
452,714
Latest member
streamer1234

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