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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Measure to create a sum of a column based on matched values from another table

I have a column for Channel and its viewership across different regions in Table 1. This is a weekly data.

In Table 2, I have Channel and its preferred region (one per channel).

I want to create a measure to show a graph which has channels and the sum of viewership for the preferred region. 

 

Can't find any solution. Need help.

1 ACCEPTED SOLUTION

HI  @Anonymous 

Assume that you have create a relationship between two tables by Channel field, then just use this formula to create a measure:

Measure = CALCULATE(SUM('Table 1'[Viewership]),FILTER('Table 1','Table 1'[Region] =RELATED('Table 2'[Preferred region])))

 

or

Measure 2 = CALCULATE(SUM('Table 1'[Viewership]),FILTER('Table 1','Table 1'[Region] =MAX('Table 2'[Preferred region])))

 

here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,

If you join, slicer should help

Else refer

https://docs.microsoft.com/en-us/dax/treatas-function

OR Can you share sample data and sample output.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit,

 

Thanks for the response. I was actually looking to create a measure instead of a table.

 

The data looks something like this;

 

Table 2Table 2Table 1Table 1

HI  @Anonymous 

Assume that you have create a relationship between two tables by Channel field, then just use this formula to create a measure:

Measure = CALCULATE(SUM('Table 1'[Viewership]),FILTER('Table 1','Table 1'[Region] =RELATED('Table 2'[Preferred region])))

 

or

Measure 2 = CALCULATE(SUM('Table 1'[Viewership]),FILTER('Table 1','Table 1'[Region] =MAX('Table 2'[Preferred region])))

 

here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.