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
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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors