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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sheetals
Helper I
Helper I

Showing unexpected values in Power BI charts

Please find my expected result below

pbi3.PNG

But I am getting result as below

pbi4.PNG

where I have choosed Order Id from orders table and Product Id from Order Items tables and I have used below measure 

order_to_orderitem = CALCULATE(SUM('Order Items'[Unit Price]),USERELATIONSHIP(orders[key12],'Order Items'[key12]))
 
Note: key12 is merged column of Order Id and Product Id in both orders and Order Items table
 

I have a datamodel as shown below

pbi5.png

I have given a relationship as shown blow

pbi6.PNG

It has been created as shown below where From Table is Order Items and To Table is orders whereas while creating I have given orders as From Table and Order Items as To Table

pbi7.PNG

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @sheetals 

 

You can try the following methods.

order_to_orderitem = 
IF (
    MAX ( 'orders'[Product ID] ) == BLANK (),
    BLANK (),
    CALCULATE (
        SUM ( 'Order Items'[Unit Price] ),
        USERELATIONSHIP ( orders[key12], 'Order Items'[key12] )
    )
)

vzhangti_0-1638760552167.png

If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @sheetals 

 

You can try the following methods.

order_to_orderitem = 
IF (
    MAX ( 'orders'[Product ID] ) == BLANK (),
    BLANK (),
    CALCULATE (
        SUM ( 'Order Items'[Unit Price] ),
        USERELATIONSHIP ( orders[key12], 'Order Items'[key12] )
    )
)

vzhangti_0-1638760552167.png

If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors