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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Matrix with real and target values - target measure doesn't appear!

Hello, 

i have an error related on how to place [real] Resources and Target values on a matrix. 

The Resources part is OK, the problem starts on a Target dax measure. 

The error is dax and model related, so i'm also not sure where to place the problem. 


So i have a factual Resources with 2 dimensions. The only thing noticeable is that the client has the information on dimensions "one level down" of their name, using the labels to aggregate (cluster job to agg. job codes, and organizationalcodelevel to agg. Perimeters).

So, the problem appears when I create a “target internal” measure from the Target dimension, I can’t see any value, though measure seems very simple:

Target Internal = CALCULATE( MAX('Target'[Target]) )

 

2.png

 

 

I’ve done a 1st experience, I think it was relating Cluster Jobs To Target in a n:n relationship, and the same for the other dimension, but it didn’t work.

Then I created List of Cluster Jobs and list of Perimeters, with their distinct values, and set the relationship to their “original” dimensions as bidirectionals, to see if it would flow (and yes, in this case, I had to place these 2 tables in matrix setup…) – didn’t work also.

Ricardo1977_1-1612362733872.png

 

Then I was trying a 3rd way: forcing the existing filters of the matrix in the measure, didn’t work also:

Target Internal =

CALCULATE( MAX('Target'[Target]), 'Target'[Type] = "Internal",

Target[Perimeter] = ALLSELECTED(Perimeters[Perimeter]),

Target[Cluster Job] = ALLSELECTED('Cluster jobs'[Cluster job]) )


So by doubt is: what is the correct way of making this work?

Thanks in advance

2 REPLIES 2
Anonymous
Not applicable

Hello @lbendlin , thanks but i still cant make it work

 

Target Internal = 
CALCULATE( 
  MAX(Target[Target]), 'Target'[Type] = "Internal", 
  TREATAS(VALUES('Perimeters'[Perimeter]), Target[Perimeter]), 
  TREATAS(VALUES('Cluster jobs'[Cluster job]), Target[Cluster Job])
)

 

 

As i've written, Perimeters[Perimeter] and Cluster Jobs[Cluster job] is repeated, but this shouldn't be the problem

as VALUES returns distincts..

 

I've also tried, without success

 

CALCULATE( MAX(Target[Target]), 'Target'[Type] = "Internal", TREATAS(SELECTEDVALUE('Perimeters'[Perimeter]), Target[Perimeter]), TREATAS(SELECTEDVALUE('Cluster jobs'[Cluster job]), Target[Cluster Job]) )



Any idea?

 

TIA 

 
lbendlin
Super User
Super User

I would think that the "correct"  way of doing this is to use TREATAS() instead of trying to force it through a data model.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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