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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

selected month hide and show previous three month value

i have chart based on the month wise .  my slicer month wise data 

 week date (table name -> Date PA)

THENNA_41_0-1630041039846.png

after  added  outbound text in  

 

Week (table name -> Date PA)

WEEK = var a = DATE(2020,08,03)
var b = IF (
DatePA[Week Date] = a,"Outbound GLOBAL",IF(DatePA[Week Date]<>BLANK(),"Outbound" & DatePA[Week Date]))
return b
 
THENNA_41_1-1630041249154.png

 

my slicer looks like  

THENNA_41_2-1630041600835.png

 

 

my column chart looks like 

 

 

THENNA_41_3-1630041642161.png


if i  select july month  slicer  july month should be hide and also  previous 3 month only visible . i have tired below code 

 

combine effective date =
 
VAR NumOfMonths = -3
VAR ReferenceDate = MAX ( 'DatePA'[WEEK] )
VAR PreviousDates =
DATESINPERIOD (
'combine effective date'[Effective Date],
ReferenceDate,
NumOfMonths,
MONTH
)
VAR Result =
CALCULATE (
SELECTEDMEASURE (),
REMOVEFILTERS ( DatePA[WEEK] ),
KEEPFILTERS ( PreviousDates )
 
)
RETURN Result
 
but its not  wokring any idea  selected month should be hidden previous  three  only month date visible based on the slicer selection 

 

2 REPLIES 2
SanketBhagwat
Solution Sage
Solution Sage

Hi @Anonymous .

As far as I understood from your problem, I think you need to show previous 3 months data expect the current selected month.

You can use the below measure;

P:revious 3 Months =
CALCULATE(SUM(Table1[Sales]),FILTER('Calendar','Calendar'[Month]>SELECTEDVALUE('Month'[Month]) && 'Calendar'[Month]<=SELECTEDVALUE('Month'[Month])-3))
 
Please let me know if it solves your problem.
 
If this post helps, then please mark it as 'Accept as Solution' so that other users could find it easily.
 
Regards,
Sanket Bhagwat
Anonymous
Not applicable

@SanketBhagwat  tired its not working 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.