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
AllanBerces
Post Prodigy
Post Prodigy

Filter Summarized

Hi and good day,

Can someone check and correct my below code. Im getting error of 

AllanBerces_0-1737897201796.png

 

Oveall_MnHrs_Overview = FILTER(
SUMMARIZE('Table01',
'Table01'[Area],
'Table01'[Subcon] ,
'Table01'[Scope] ,
'Table01'[WeekNo.] ,
'Table01'[Year] ,
'Table01'[TA_rev] ,
"Current_Remaining", CALCULATE(SUM('Table01'[Remaining hours]),
"Actual_ForecastHRS", CALCULATE(SUM('Table01'[Actual_ForcastHRS])),
[TA_rev] = "ACTIVE"
&& [Year] = 2025
)))

 

Thank you

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @AllanBerces ,

Your DAX formula contains several syntax issues that need to be addressed. Specifically, there are misplaced parentheses, incorrect handling of calculated columns within SUMMARIZE, and improper placement of filter conditions in the FILTER function. Below is the corrected version of your DAX formula:

Oveall_MnHrs_Overview = 
FILTER(
    SUMMARIZE(
        'Table01',
        'Table01'[Area],
        'Table01'[Subcon],
        'Table01'[Scope],
        'Table01'[WeekNo.],
        'Table01'[Year],
        'Table01'[TA_rev],
        "Current_Remaining", CALCULATE(SUM('Table01'[Remaining hours])),
        "Actual_ForecastHRS", CALCULATE(SUM('Table01'[Actual_ForcastHRS]))
    ),
    [TA_rev] = "ACTIVE" && [Year] = 2025
)

In this corrected version, the SUMMARIZE function groups the data by the specified columns (Area, Subcon, Scope, WeekNo., Year, and TA_rev) and creates two calculated columns: "Current_Remaining", which calculates the sum of Remaining hours, and "Actual_ForecastHRS", which calculates the sum of Actual_ForcastHRS. The FILTER function then filters this summarized table to include only rows where TA_rev equals "ACTIVE" and the Year equals 2025. This structure ensures that all syntax issues are resolved and the formula works as intended.

 

Best regards,

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @AllanBerces ,

Your DAX formula contains several syntax issues that need to be addressed. Specifically, there are misplaced parentheses, incorrect handling of calculated columns within SUMMARIZE, and improper placement of filter conditions in the FILTER function. Below is the corrected version of your DAX formula:

Oveall_MnHrs_Overview = 
FILTER(
    SUMMARIZE(
        'Table01',
        'Table01'[Area],
        'Table01'[Subcon],
        'Table01'[Scope],
        'Table01'[WeekNo.],
        'Table01'[Year],
        'Table01'[TA_rev],
        "Current_Remaining", CALCULATE(SUM('Table01'[Remaining hours])),
        "Actual_ForecastHRS", CALCULATE(SUM('Table01'[Actual_ForcastHRS]))
    ),
    [TA_rev] = "ACTIVE" && [Year] = 2025
)

In this corrected version, the SUMMARIZE function groups the data by the specified columns (Area, Subcon, Scope, WeekNo., Year, and TA_rev) and creates two calculated columns: "Current_Remaining", which calculates the sum of Remaining hours, and "Actual_ForecastHRS", which calculates the sum of Actual_ForcastHRS. The FILTER function then filters this summarized table to include only rows where TA_rev equals "ACTIVE" and the Year equals 2025. This structure ensures that all syntax issues are resolved and the formula works as intended.

 

Best regards,

Hi @DataNinja777 thank you you very much working great.

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.

Users online (125)