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
Anonymous
Not applicable

UNABLE TO ADD FILTERS TO BELOW DAX

i wanted to filter the data in the below DAX in (power bi paginated reports) for the  ('CombineDataSet'[Project Name] in ('115001' and  '115002') 

i tried different syntax but none of them are working will be greatful if some on ec can help on this..

 

 

 

EVALUATE SELECTCOLUMNS (ADDCOLUMNS (SUMMARIZECOLUMNS (ROLLUPADDISSUBTOTAL ('CombineDataSet'[Project Name], "h0")), "ParameterLevel", if ([h0], 0, 1)), "ParameterCaption", SWITCH([ParameterLevel], 1, 'CombineDataSet'[Project Name], "Blank()"), "ParameterValue", 'CombineDataSet'[Project Name], "ParameterLevel", [ParameterLevel], "'CombineDataSet'[Project Name]", 'CombineDataSet'[Project Name])
order by 'CombineDataSet'[Project Name], [ParameterLevel]

 

 

 

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

The easiest way to do this is probably to use the TREATAS function and pass this as a filter table in the SUMMARIZECOLUMNS function

 

EVALUATE
SELECTCOLUMNS (
    ADDCOLUMNS (
        SUMMARIZECOLUMNS (
            ROLLUPADDISSUBTOTAL ( 'CombineDataSet'[Project Name], "h0" ),
            TREATAS({"115001", "115002"}, 'CombineDataSet'[Project Name] )
        ),
        "ParameterLevel", IF ( [h0], 0, 1 )
    ),
    
    "ParameterCaption", SWITCH ( [ParameterLevel], 1, 'CombineDataSet'[Project Name], "Blank()" ),
    "ParameterValue", 'CombineDataSet'[Project Name],
    "ParameterLevel", [ParameterLevel],
    "'CombineDataSet'[Project Name]", 'CombineDataSet'[Project Name]
)
ORDER BY
    'CombineDataSet'[Project Name],
    [ParameterLevel]

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you @d_gosbell  that worked and thats a great help will be greatful for the same..😊

d_gosbell
Super User
Super User

The easiest way to do this is probably to use the TREATAS function and pass this as a filter table in the SUMMARIZECOLUMNS function

 

EVALUATE
SELECTCOLUMNS (
    ADDCOLUMNS (
        SUMMARIZECOLUMNS (
            ROLLUPADDISSUBTOTAL ( 'CombineDataSet'[Project Name], "h0" ),
            TREATAS({"115001", "115002"}, 'CombineDataSet'[Project Name] )
        ),
        "ParameterLevel", IF ( [h0], 0, 1 )
    ),
    
    "ParameterCaption", SWITCH ( [ParameterLevel], 1, 'CombineDataSet'[Project Name], "Blank()" ),
    "ParameterValue", 'CombineDataSet'[Project Name],
    "ParameterLevel", [ParameterLevel],
    "'CombineDataSet'[Project Name]", 'CombineDataSet'[Project Name]
)
ORDER BY
    'CombineDataSet'[Project Name],
    [ParameterLevel]

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.