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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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