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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Clarification in table relationship

 

Lets consider i have a model like this. Relationship between sales and state is both

Model.JPG

 

I want to see quota by state in a table

 

State quota table.JPG

 

Quota of state XXXX will not be displayed in table as it has no sales table records, Is there any way to get that record without modifiying this model ?

 

I know we can achieve this by changin the model as below

 

Alter model.JPG

 

But this model is reducig the performance when Seller details and sales data are seen together (We are doing this in direct query)

 

May be this could be a simple fix, Any help is appreciated.

 

 

Thanks,

Dinesh J.

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi Dinesh,

 

There could be two methods.

Method one:

1. Create a new inactive relationship;

2. Create a measure.

Measure =
CALCULATE (
    SUM ( Seller[Quota] ),
    USERELATIONSHIP ( Seller[State ID], State[ID] )
)

Clarification_in_table_relationship1

Method two:

Create a measure.

Measure 2 =
IF (
    MIN ( State[ID] ) IN VALUES ( Sales[State] ),
    BLANK (),
    CALCULATE (
        SUM ( Seller[Quota] ),
        FILTER ( Seller, Seller[State ID] = MIN ( State[ID] ) )
    )
)

Clarification_in_table_relationship2

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi Dinesh,

 

There could be two methods.

Method one:

1. Create a new inactive relationship;

2. Create a measure.

Measure =
CALCULATE (
    SUM ( Seller[Quota] ),
    USERELATIONSHIP ( Seller[State ID], State[ID] )
)

Clarification_in_table_relationship1

Method two:

Create a measure.

Measure 2 =
IF (
    MIN ( State[ID] ) IN VALUES ( Sales[State] ),
    BLANK (),
    CALCULATE (
        SUM ( Seller[Quota] ),
        FILTER ( Seller, Seller[State ID] = MIN ( State[ID] ) )
    )
)

Clarification_in_table_relationship2

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Dale,

This solution worked.

 

Thanks,

Dinesh J.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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