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
Timmyyoungm
New Member

select a a single date from a date filter and another visual

Does anyone know how I can select a a single date from a date filter and once it is, I have one visual specifically pulling up information for the quarter that the date is in, and the previous quarter that the date is related to as well? For example, if I select the slicer 7/16/21, one of my visuals would say Quarter 3, and another would be Quarter 2. I already have a date table with the quarter it belongs in, but am struggling with the DAX to do this
1 ACCEPTED SOLUTION
Rayshin
Memorable Member
Memorable Member

@Timmyyoungm 
You should be able to just put the QuarterName in another visual. The slicer will automatically filter the value for the quartername for this first visual. For the previous quarter, you can make a measure like this:

PreviousQuarter = 
CALCULATE(
    MIN('Date'[QuarterName]),
    DATEADD('Date'[Date], -1, QUARTER)
) 

 

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Timmyyoungm 

PLease refer to sample file with the solution https://www.dropbox.com/t/stTqD016sOoBVw4D

You need to have a previous date table (just a shadow copy of the date table) with inactive relationship with the date table. Apologies for not being able to share screenshots as I already consumed my limit. Here is the measure code:

Sales Last 2 Quarters = 
VAR RefDate = ENDOFQUARTER ( 'Date'[Date] )
VAR PreviousDates =
    DATESINPERIOD ('Previous Dates'[Date], RefDate, - 2, QUARTER )
VAR Result =
    CALCULATE ( 
        [Sales Amount],
        REMOVEFILTERS ( 'Date' ),
        KEEPFILTERS ( PreviousDates ),
        USERELATIONSHIP ( 'Date'[Date], 'Previous Dates'[Date] )
    )
RETURN
    Result
Rayshin
Memorable Member
Memorable Member

@Timmyyoungm 
You should be able to just put the QuarterName in another visual. The slicer will automatically filter the value for the quartername for this first visual. For the previous quarter, you can make a measure like this:

PreviousQuarter = 
CALCULATE(
    MIN('Date'[QuarterName]),
    DATEADD('Date'[Date], -1, QUARTER)
) 

 

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.