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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
stranter
Frequent Visitor

Creating a column filtered on values in a related table

Hi,

 

I am trying to recreate an SSRS report in Power BI.  The report has a smmary page thus:

 

Agreement Value

Billing Account

Service Account

Agreement Number

Total Number of Orders

Number of Outstanding Orders

Outstanding £

Number of Invoiced Orders

Invoiced £

Total £

 

In Power BI, I have following tables:

 

Agreements

n--->1 Billing Accounts

n--->1 Service Accounts

1--->n Orders

        1--->n Bookings

 

I can reproduce the summary page in it's entirety apart from:

 

Outsanding £

Invoiced £

 

These columns need to sit in an Order record and are the sum of related Bookings, split according to the status of a Booking.  How do I do this?

 

Thanks,

 

Stewart

1 ACCEPTED SOLUTION
stranter
Frequent Visitor

I solved it by using this article.  The code for my calculated column is:

 

Invoiced £ = 
var invamt = CALCULATE(sum(Bookings[costtocustomer]), Bookings[Status] = "Completed")
return invamt

Stewart

View solution in original post

1 REPLY 1
stranter
Frequent Visitor

I solved it by using this article.  The code for my calculated column is:

 

Invoiced £ = 
var invamt = CALCULATE(sum(Bookings[costtocustomer]), Bookings[Status] = "Completed")
return invamt

Stewart

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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