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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.