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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
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.