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
SRobbo1990
Frequent Visitor

Help with creating a DAX measure based off of MDX

Hi All,

 

I am in the process of creating a measure that has already been created in MDX some time ago but works. The measure is as below;

 

(
[Measures].[Count of Trips],

LinkMember ([Enquiry Date].[Year-Quarter-Month-Date].currentmember, [Departure Date].[Year-Quarter-Month-Date] )
, [Enquiry Date].[Year-Quarter-Month-Date].[All]

,LinkMember ([Booking Employment Structure].[Full Name].Currentmember, [Employment Structure].[Full Name])
, [Booking Employment Structure].[Full Name].[All]

,LinkMember ([Booking Employment Structure].[Job Title].Currentmember, [Employment Structure].[Job Title])
, [Booking Employment Structure].[Job Title].[All]

, [Trip Workflow].[Workflow].[Workflow Step].&[3.Booking]
, [Cancellation Date].[Year-Quarter-Month-Date].[Year].&
)

 

So background as to what this is trying to do - I have two tables that are identical, Employment structure and Booking Employment structure. They each have a relationship to a single fact table called Trip. My organisation want to get a count of trips at each stage of the booking process using the Booking Employment Structure but wish to see a count of departures using the employment strucutre. I believe I need to use USERELATIONSHIP somewhere but am struggling to replicate the above in the test scenario. Below is a view of the table so far;

 

SRobbo1990_0-1664795447591.png

 

As you can see I'm using the Booking Employment structure[Full Name] in the table and need to create a measure to include another value using the Employment Strucutre[Full Name] in the table.

 

Hope that makes sense and thanks in advance

1 ACCEPTED SOLUTION

Hi there,

 

In the end I was able to figure out the issue using the TREATAS funciton

 

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@SRobbo1990 , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

See if this blog can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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

Hi there,

 

In the end I was able to figure out the issue using the TREATAS funciton

 

 

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!

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.

Top Solution Authors
Top Kudoed Authors