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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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 is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.