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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
sam_gift
Helper I
Helper I

DAX to create columns using userelationship

 Hi Have 2 tables. Customer and Fact

Customer:

sam_gift_1-1698782853105.png

Fact:

sam_gift_2-1698782903479.png

 

They have 1 active and 2 inactive relationships.

sam_gift_0-1698782820806.png

 

How can I create a table with all the Payer, Billed and shipped customers information with revenue.

I have to use only dax not power query.

Please help

 

1 REPLY 1
FreemanZ
Super User
Super User

hi @sam_gift ,

 

not sure if i fully get you, you may plot a table visual with customer[customer_key] with three measures like:

RevenueByPay = SUM(fact[Revenue])

RevenueByBill = 
CALCULATE(
    [RevenueByPay],
    USERELATIONSHIP(fact[BillToCustomerKey], customer[customer_key])
)

RevenueByShip = 
CALCULATE(
    [RevenueByPay],
    USERELATIONSHIP(fact[ShipToCustomerKey], customer[customer_key])
)

 

it worked like:

FreemanZ_0-1698803079777.png

 

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.