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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
pbrainard
Helper III
Helper III

Filter Date by Slicer Selection

I have a slicer for fiscal quarters... Q1 Q2 Q3 Q4

 

This calculated table helps me find the min and max dates for a compare. How do I edit this table query to be able to have the End Date determined by the quarter selected in the slicer?

 

CalcTablePHQGAD =
ADDCOLUMNS (
ADDCOLUMNS (
SUMMARIZE ( MHGAD_PHQ, MHGAD_PHQ[Client_ID], MHGAD_PHQ[Assess_Type] ),
"Start Date", CALCULATE ( MIN ( MHGAD_PHQ[Assess_Date] ) ),
"End Date", CALCULATE ( MAX ( MHGAD_PHQ[Assess_Date] ) )
),
"Start Score",
VAR _current_asset_type = MHGAD_PHQ[Assess_Type]
VAR _current_start_date = [Start Date]
RETURN
CALCULATE (
AVERAGE ( MHGAD_PHQ[Assess_Score] ),
MHGAD_PHQ[Assess_Date] = _current_start_date,
MHGAD_PHQ[Assess_Type] = _current_asset_type
),
"End Score",
VAR _current_asset_type = MHGAD_PHQ[Assess_Type]
VAR _current_end_date = [End Date]
RETURN
CALCULATE (
AVERAGE ( MHGAD_PHQ[Assess_Score] ),
MHGAD_PHQ[Assess_Date] = _current_end_date,
MHGAD_PHQ[Assess_Type] = _current_asset_type
),
    "Dates Okay",
        IF (
            [End Date] > [Start Date],
            "Yes",
            "No"
            )
)
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello

 

It is much more easier to have a Table Date with all the columns you want

eg

JamesFr06_0-1653759019430.png

 

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@pbrainard 


Calculated tables are created at the data model level, and they are used in your report canves. Any slicer you apply to the canves will not affect the calculated tables. 
Consider creating a measure to use the selection from the slicer.  


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

I think that's where I'm stuck. How would I create such a measure? I'm guessing I want to incorporate the SELECTEDVALUE on this line...?

"End Date"CALCULATE ( MAX ( MHGAD_PHQ[Assess_Date] ) )

 

I do have the calc table connected to a calendar table and trying to have my 'End Date' be the max date of the quarter selected, so it ignores dates that are greater than the selected quarter.

Anonymous
Not applicable

Hello

 

It is much more easier to have a Table Date with all the columns you want

eg

JamesFr06_0-1653759019430.png

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.