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
CarlsBerg999
Helper V
Helper V

Modeling issue - TREATAS & Inactive relationships

Hi,

 

I have a data modeling issue that i can't seem to resolve. The data model is described below. What I need to do, is use the report filter to filter the results in the Matrix table.

 

CarlsBerg999_1-1634011978015.png

 

 

The issue is rather simple: The filter is not working for attributes because there is no active relationship. I cannot activate a connection between Filter Table and Attributes table, because it would cause ambiguity. The usual resolution would be USERELATIONSHIP, but it doesnt seem to resolve the issue in my measure.

 

Twist: I need to use "TREATAS" in the table due to complexity of the entire model. 

 

The current measure i have is: 

 

CALCULATE(SUM('Fact Table'[Value]),
TREATAS(VALUES('Categories'[Categories]),'Fact Table'[Categories]),
'Fact Table'[Product ID]IN{"20002"})

 

--> This does not produce results in the matrix table. It does work, if i switch on the relationship from the attributes to filter.

 

Any ideas on how to make this work? Note, i absolutely must use TREATAS for the categorization.  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@CarlsBerg999 

Add a relationship from Categories Table to the Fact Table. 

Vpazhenmsft_0-1634193783425.png

 

And try use the following measure with TREATAS ():

Measure = CALCULATE(SUM('Fact Table'[Value]),
TREATAS(VALUES('Filter Table'[Filter]),'Attributes'[Filter]),
'Fact Table'[Product ID]IN{"20002"})
 
 
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@CarlsBerg999 

Add a relationship from Categories Table to the Fact Table. 

Vpazhenmsft_0-1634193783425.png

 

And try use the following measure with TREATAS ():

Measure = CALCULATE(SUM('Fact Table'[Value]),
TREATAS(VALUES('Filter Table'[Filter]),'Attributes'[Filter]),
'Fact Table'[Product ID]IN{"20002"})
 
 
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.