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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Rowbased DAX Measure doesn't work with Dim Table

Hello,

I've been puzzling and I've the feeling that I almost have the result but I'm missing something. 
I've made a sample report that represents the issue https://we.tl/t-2rSfNSPa3L 

 

There is a table Objectives that has: per (Cycle, ID, Area,  Emp) an Objective (the objective has to do with the ID and the Area, the Emp is just the person connected to the ID)
Another table Activities with: per ( Date, ID, Area, Emp) an Activity (multiple activities per cycle possible).
And a few Dim tables.

The thing that doesn't work is that I need to "cap" the [# Activities CTD] (<-- number of activities cycle to date) of the Emps if they are higher than the Objectives of the ID the activity is with. -->  I can get the information that I want if I use the EmpKey of the FactTable (see blue columns in pictue below), but not when I use the Full Name of DimEmp (see the bottom table)

sample report.png
The connections are existing (see Attachment 'data model'). 
data model.PNG
The problem lies in the measure 'Objectives': 

JasEbk_0-1633366586627.png

 

 

 

Adding the var selected_emp didn't work and userelationship didn't work either. The problem probably lies in the fact that the measure Objectives is a SELECTEDVALUE instead of a SUM. But in the input table 'Objectives'  there is always only 1 objective per (Cycle, ID, Area *and Emp), so if I just take the SUM of the objectives and do the [# Activities Capped] with the SUM of [# Activities CTD] then it doesn't take the ID into account and the activities capped doesn't make sense then. 

So I need a row based function that selects the Objectives and performs the measure  [# Activities Capped] per ID, and in a way that I can link it with DimEmp[EmpKey]  instead of only with Objectives[EmpKey]

1 REPLY 1
lbendlin
Super User
Super User

The file transfer link has expired, can you please resubmit?

 

This part

 

CALCULATE(SELECTEDVALUE())

 

has a certain smell to it. Most likely it is not what you need in this situation.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.