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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
V-pazhen-msft
Community Support
Community Support

@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
V-pazhen-msft
Community Support
Community Support

@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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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