cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
selimovd
Super User
Super User

Showing current and the next 2 month

Hello everyone,

 

I want to select a date from a slicer and then my measure should only deliver the selected and the 2 next month:

So if I select 2011-08 on my slicer:

pbi1.png

 

Then I want in all tables just to show the selected month and the following 2 month:

 

 

pbi2.png

 

Somehow I'm a little stuck.

I can get the highest selected date with: 

max(DimDate[FullDateAlternateKey])
 
For the measure I tried:
SumSales+3 = 
VAR maxDate = max(DimDate[FullDateAlternateKey])

RETURN
CALCULATE(SUM(FactInternetSales[SalesAmount]); FILTER(DimDate;DimDate[FullDateAlternateKey]>=maxDate && DimDate[FullDateAlternateKey]<DATEADD(DimDate[FullDateAlternateKey];3;MONTH)))
But somehow this doesn't work at all. Can someone help me?
 
Thank you and best regards
1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @selimovd ,

For your requirement, you could refer to this similar thread firstly.

If you still need help, please share your data sample so that we could help further on it.

In addition, here is another reference.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.