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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
donovanm
Frequent Visitor

Calculating Values By Contract By Country From Multiple Tables

Hi, 

 

I am trying to produce a table that will report the number of contracts that my company has in each country by reference.  This is complicated slightly by the the fact that I am using multiple tables.

 

Underwriter Ref & RiskCountry are within Table 1 and DeclartionCount are in Table 2.

 

This is the desired result

 

Underwriter RefRiskCountryNo of Policies
ref1AACanada                                                            3
ref1AASingapore                                                            1
ref1AASouth Africa                                                            1
ref1AATaiwan                                                            1
ref1AAUnited Arab Emirates                                                            3
ref1AAUnited States                                                            2
ref1AGUnited States                                                            9
ref1AKCanada                                                    3,876
ref1AMUnited States                                                        180
ref1ANUnited States                                                        499
ref1AQUnited States                                                            1

Total                                                    4,576

 

But what I am currently returning is

 

Underwriter RefRiskCountryNo of Policies
ref1AACanada                                                    4,576
ref1AASingapore                                                    4,576
ref1AASouth Africa                                                    4,576
ref1AATaiwan                                                    4,576
ref1AAUnited Arab Emirates                                                    4,576
ref1AAUnited States                                                   4,576

 

Any assistance would be greatfully appreciated.

1 ACCEPTED SOLUTION

You can do a relationship by using the two columns country and company reference

View solution in original post

9 REPLIES 9
v-lgarikapat
Community Support
Community Support

Hi @donovanm ,

Thanks for reaching out to the Microsoft fabric community forum.

@ronrsnfld @FreemanZ @tharunkumarRTK , 

Thanks for your prompt response

 

@donovanm , 

Please provide sample data that fully covers your issue or question, in a usable format (not as a screenshot). Do not include sensitive information or anything unrelated to the issue. Also, show the expected outcome based on the sample data you provided.

Best Regards,

Lakshmi Narayana

Hi @donovanm ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept as Solution" and give a 'Kudos' so other members can easily find it.

 

Best regards,
LakshmiNarayana
.

Hi @donovanm ,

 

If your question has been answered, kindly mark the appropriate response as the Accepted Solution. This small step goes a long way in helping others with similar issues.

We appreciate your collaboration and support!

Best regards,
LakshmiNarayana

ronrsnfld
Super User
Super User

Please also post your Table 1 and Table 2

tharunkumarRTK
Super User
Super User

You can create a relationship and then add 

create a simle DAX measures for No.ofPolicies 

No of Policies = SUM(Table[No of Policies])

Create a table visual and bring the Underwriter Ref & RiskCountry columns and the above measure into it. 

 

 

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

Hi, thank you for your suggestion.  I am now closer but I still have an issue so the measure may need some tweaking.

 

Company RefRiskCountry                                                    4,576
ref1AACanada11
ref1AASingapore11
ref1AASouth Africa11
ref1AATaiwan11
ref1AAUnited Arab Emirates11
ref1AAUnited States11
ref1AGUnited States9
ref1AK Canada                                                     3,876
ref1AM United States                                                         180
ref1AN United States                                                         499
ref1AQ United States                                                             1
   
 Total                                                    4,631

 

Thank you in advance.

hi @donovanm ,

 

how are Table1 and Table2 related?

Hi,

 

I have a relationship on the company reference.

 

Rgds,

 

 

You can do a relationship by using the two columns country and company reference

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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