Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
PorterHaus
Frequent Visitor

How to calculate values greater than the filtered date

I have a bar chart showing revenue by month and a date slicer for the range. I would like to add another column for forecasted revenue but have the forecasted revenue be only for dates after the date range in the slicer.

 

Here is what I've attempted:

 

To get the max date from the slicer:

Max Date Value = MAXX(
KEEPFILTERS(VALUES(DimDate[FullDate])),
CALCULATE(MAX(DimDate[FullDate]))
)

 

To get the forecasted amount for dates after the max date:

Forecasted Amount = CALCULATE(
Forecast[Total Forecast Amount],
FILTER(ALL(DimDate), DimDate[FullDate] > [Max Date Value])
)

 

Table currently (expecting to see forecasted amounts for april and may):

rev.PNG

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi PorterHaus,

 

Modify measure [Max Date Value] like below and try again:

Max Date Value =
CALCULATE ( MAX ( DimDate[Fulldate] ), ALLSELECTED ( DimDate[Fulldate] ) )

Regards,

Jimmy Tao

Hi @v-yuta-msft,

 

Thank you for your reply. I updated the measure to match yours and nothing has changed. I think the problem is in the Forecasted Amount measure because I expect to see values after 3/30/18 but currently don't.

 

Thank you

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.