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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

What is the equivalent MDX for this DAX measure?

I have this measure in DAX in a Power BI report:

 

Count Over 75 =
    SUMX(
        SUMMARIZE(
            'FactTable',
            'Employee'[EmpID],
            'Employee'[StoreID],
            'Project'[Project],
            "_Over75", IF([MeasureOfInterest] >= 75, 1)
        ),
        [_Over75]
    )

 

It it working as expected. It returns the correct result at all three levels of drill-down (StoreID, Project, Employee) on a matrix visual.

The data source is an SSAS database.

I have an Excel spreadsheet that has connected to the SSAS database. I wish to create a new MDX Calculated Measure to perform the same functionality. I have tried the following MDX measure:

 

SUM(
  NONEMPTY(
    EXISTING
    (
      [Employee].[EmpID],
      [Employee].[StoreID],
      [Project].[Project]
    )
  )
  ,
  CASE
    WHEN [Measures].[MeasureOfInterest] >= 75 THEN 1
  END
)

 

but it does not work correctly. I gives the correct results when evaluating the pivot table at the EmpID level, but not at the Project or Store levels.  

I need the MDX syntax that forces the evaluation to be done down at the (Store, Project, Employee) grain, and then at any other level above that to simply sum up the levels below.

Does anyone know how to do this?

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

 

SUMX(filter( Summarize( Employee,
Employee[EmpID],
Employee[StoreID],
Project[Project],
"_1" , [MeasureOfInterest]
), [_1] >= 75 ) , [_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak , thanks for your reply. But you have given a DAX measure. I am looking for an MDX measure that gives the same results.

Maybe I have posted this question in the wrong forum...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.