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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.