The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
@Anonymous , Try like
SUMX(filter( Summarize( Employee,
Employee[EmpID],
Employee[StoreID],
Project[Project],
"_1" , [MeasureOfInterest]
), [_1] >= 75 ) , [_1])
@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...
User | Count |
---|---|
14 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |