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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Jack007
Frequent Visitor

How Treatas work with Physical relationship?

I have a calendar look-up table that is physically connected to 2 datasets

Jack007_0-1696643069649.png

The dataset below project list and PTP contains customer number in many to many relationship. So I decide to use treatas to create a virtual relationship. 

 

PT Revenue = CALCULATE(
    SUM('PTP% w o contingency'[revenue]
    ),
    TREATAS(
        VALUES(
            'project list'[customer number]),
            'PTP% w o contingency'[customer number]
))

 

When I create a visualization, PT Revenue appears correctly when only the customer number is displayed. However, when I try to drill down to fiscal year, PT Revenue does not appear. Can anyone help me understand this?

Jack007_0-1696644022985.png

 

 

5 REPLIES 5
lbendlin
Super User
Super User

When you use TREATAS with table that are related you are messing with/overriding the data model joins. Sometimes it is benign (no impact) but other times you are overriding the "natural"  filters coming through the data model.  General recommendation: Don't do it.

Is there a more efficient approach to achieve this task? I have a project list with customer numbers that recur, and I want to combine the revenue from a separate dataset that also has recurring customer numbers. The two datasets are connected through the customer number.

Are you sure the data model can't do that for you?

 

I could try to link the datasets by customer number, but I learned that I should avoid many-to-many relationships since only a portion of the customer numbers between the datasets are the same.

If that is the case then you can consider normalizing your data so you get clean and covering dimension tables.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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