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
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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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