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
Unicorn_Tech
Resolver I
Resolver I

Adding extra values to a total per country

Hello.  I have a bit of a complication.  I have a license table, which has licensee records including "official total area", licensee, and country.  In my visual, I need to show the a column that includes the official total area sum per Country (no problem so far.)

The parent record is the license table, child of the license table is the Contracts table, child of the Contracts table is Contract Lines.

The "official total area" value comes from CRM calculations that only sum the values of certain contracts, which only consider certain Contract Lines.  It works fine.

In  my PowerBI visual, I need to have a column that shows the total per country of two values: "Official total area" and a new column/measure that takes the sum of "official total area" and adds "Amount to Include" from the Contract line table IF the value of "Include" is TRUE, for relevant countries.

I am trying to do a calculate column in the License table, but the problem I have is this a child of a child relationship. How could I return the sum of all the "Amount to Add" area for all relevant contracts of the license row?   I'm stuck here:

Sum of agreement = calculate(Sum(new_contractlines[new_amounttoincludedaa]),filter(new_contractlines,new_contractlines[_new_contract_id_value] = 

I would finish it with the contract ID on the Contract Line relates to the Contract ID of the Contracts, which has a licensee id of the License record.

1 ACCEPTED SOLUTION
Unicorn_Tech
Resolver I
Resolver I

I solved this by adding a lookupvalue in the contractline table to the licenseid, and then made my formulas.

View solution in original post

1 REPLY 1
Unicorn_Tech
Resolver I
Resolver I

I solved this by adding a lookupvalue in the contractline table to the licenseid, and then made my formulas.

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.

Top Solution Authors