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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MindfullyLost
New Member

Calculated Table not filtering based on slicer

I am trying to get a calculated table to aggregate based on the selection in a slicer. It seems to simply ignore what is selected in the slicer and calculates the same values in the table regardless. I have some measures shown further below that I used for troubleshooting and they all work as intended. I'll also attach a screenshot of the relationships.

 

I have worked with chatgpt to try 20 different variants for producing EWS_Summary but nothing has worked. I'm about to give up and accept that this cannot be done which would be disappointing. It seems to be an issue with Context Filtering and the nature of ADDCOLUMNS.

 

This is my DAX to create a table:

EWS_Summary = 
ADDCOLUMNS (
    SUMMARIZE (
        EWS,
        EWS[Student Number]  -- Group by student number
    ),
    "Attendance Present Days",
    CALCULATE(
        SUM(EWS[Attendance Present Days]),
        EWS[SchoolYearTerm] IN VALUES(TermSelection[SchoolYearTerm])  -- Apply slicer filter for term
    ),
    "Attendance Membership Days",
    CALCULATE(
        SUM(EWS[Attendance Membership Days]),
        EWS[SchoolYearTerm] IN VALUES(TermSelection[SchoolYearTerm])  -- Apply slicer filter for term
    )
)

 

Here are some Measures I created for troubleshooting, all work as intended:

CheckFilter = 
CALCULATE(
    COUNTROWS(EWS),
    EWS[SchoolYearTerm] IN VALUES(TermSelection[SchoolYearTerm])
)

SumAttendance = 
CALCULATE(
    SUM(EWS[Attendance Present Days]),
    EWS[SchoolYearTerm] IN VALUES(TermSelection[SchoolYearTerm]))

TestSlicerSelection = 
CONCATENATEX(VALUES(TermSelection[SchoolYearTerm]), TermSelection[SchoolYearTerm], ", ")

 

Dashboard Objects.pngrelationship.png

1 ACCEPTED SOLUTION
gmsamborn
Super User
Super User

Hi @MindfullyLost 

 

Calculated tables, like calculated columns, are evaluated at refresh time.  Slicers become usable after calculated tables and calculated columns have been evaluated.

 

I hope this makes sense.



Proud to be a Super User!

daxformatter.com makes life EASIER!

View solution in original post

1 REPLY 1
gmsamborn
Super User
Super User

Hi @MindfullyLost 

 

Calculated tables, like calculated columns, are evaluated at refresh time.  Slicers become usable after calculated tables and calculated columns have been evaluated.

 

I hope this makes sense.



Proud to be a Super User!

daxformatter.com makes life EASIER!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.