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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

how to compute measure of another dimension table

I have a data model like the following:

 

Dimension Employee   1-*   Fact Sales   *-1   Dimension Date

 

Dimension Employee:

Emp Key    Emp ID   ...

 

Dimension Date:

Date Key   Date   ...

 

Fact Sales:

Emp Key   Date Key   Sale Amount

 

 

I want to get a head count of all employees that were valid for some date range (as determined by a selection of 'Dimension Date'[Date]).  This is very similar to the solution in the following post:

 

Solved: Creating a measure based on a dimension table - Microsoft Power BI Community

 

So, I have attempted:

 

Head Count =
COUNTROWS(
    SUMMARIZE(
        'Fact Sales'
        ,'Dimension Employee'[Emp ID]
    )
)

 

 

However, this isn't returning the correct value.  It returns the same value for every selection of 'Dimension Date'[Date].  How can I resolve this?  Note: Turning on bidirectional crossfiltering or replicating [Emp ID] into the fact table are not acceptable solutions.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , does Dimension Employee has a hire and termination date? because then solution is different like

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

 

if not

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

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , does Dimension Employee has a hire and termination date? because then solution is different like

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

 

if not

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

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

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.