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
philthegaps
Helper I
Helper I

Using filter in MDX

Hi all I want to filter an MDX query base on the sum of a integer field [Employee Wage Hours] at the year level, but displaying weekly summation results. Therefore I found how to filter taking into account the sum of [Employee Wage Hours] on a whole week (easy):

 

 SELECT NON EMPTY{ [Measures].[Employee Wage Hours]        
    } ON COLUMNS,

   FILTER (([03-Employee Info].[Employee Name].[Employee Name],
         [02-Week Period].[Week No].[Week No],
         [02-Week Period].[Hierarchy].[Year]
        ),
        SUM([Measures].[Employee Wage Hours]) > 20
        )
  
    ON ROWS
FROM ( [Model]) 

 

Then I have the employee/week/year for which there is more than 20 [Employee Wage Hours] a week, for each week. But I cannot see, since I have a "week" row, how to have the same 3-uples for which there is more than 20 [Employee Wage Hours] a year. Do I have to use a WITH clause ?

 

Thanks for your answer...

4 REPLIES 4
AntrikshSharma
Super User
Super User

@vanessafvg no worries, maybe @marcorusso can help.

the king will no doubt know the answer!





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




AntrikshSharma
Super User
Super User

@vanessafvg Hey Vanessa, you want to take a look at this? You opted for MDX questions hence seeking your expertise.

gosh i realise its been a while since i have had to do this!    not sure i can help here.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.