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
opyke
Regular Visitor

Filter before calculated table generation

Hi,

 

I am using the following DAX to create a calculated table which summarises/totals data for University applications and fills in week end dates where there is no data.

 

 

 

ApplicationSummary =

    VAR MissingDates = GENERATESERIES (
                            MIN('Application'[SubmissionWeekEndDate]),
                            MAX('Application'[SubmissionWeekEndDate]),
                            7 )
                               
    VAR MissingDatesWithAddedColumns = ADDCOLUMNS(
                                            MissingDates,
                                            "Programme_Level__c", BLANK(),
                                            "Requested_Academic_Year__c", BLANK(),
                                            "Requested_Intake__c", BLANK(),
                                            "Total Applications", BLANK(),
                                            "Total Application Offers", BLANK(),
                                            "Total Application Firm Acceptances", BLANK()
                                        )                                           
   
    VAR SummarizedTotals = SUMMARIZECOLUMNS(
                                'Application'[SubmissionWeekEndDate],
                                'Application'[Programme_Level__c],
                                'Application'[Requested_Academic_Year__c],
                                'Application'[Requested_Intake__c],
                                "Total Applications",
                                COUNTROWS('Application'),
                                "Total Application Offers",
                               SUMX('Application',IF('Application'[hed__Application_Status__c] IN {"Conditional Offer", "Unconditional Offer"},1,0)),
                                "Total Application Firm Acceptances",
                                SUMX('Application',IF('Application'[Offer_Reply__c] = "Firm",1,0))
                            )

    RETURN GENERATEALL(MissingDates, FILTER(SummarizedTotals,'Application'[SubmissionWeekEndDate] = [Value]))

 

 

 

The data looks like this:

 

opyke_0-1680767754977.png

 

This calculated table is used for two visuals and there are slicers which are used to filter on Requested Intake, Requested Year and Programme data in the calculated table, and also to show/hide the Y-Axis values on each of the visuals.

 

Picture1.png

 

The problem is that when filters are applied, the week end dates with no data are filtered out. i.e. In the new applications visual below, the first data point is 4th December 2020, the second is 8th Jan 2021. 11th, 18th, 25th and 1st Jan are missing, and this is because there is data on these dates, but with a different requested intake,

opyke_2-1680767754988.png

 

It seems that what I need to do is filter the source table before the data in the calculated table is generated.

 

Is this possible?

 

Thanks

1 REPLY 1
lbendlin
Super User
Super User

Yes, but only directly in the definition of the calculated table. 

 

Calculated tables and columns are computed only ONCE  during the dataset refresh.  They cannot be influenced by measures or filters   (one exception is when you create calculated tables temporarily inside a measure)

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.