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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Syndicate_Admin
Administrator
Administrator

Measure looking for value in another table

Hello, I expose my case to see if you can help me again.

I have 2 related tables (DAILY Table and HISTORICAL Table) by the "Supervisor" column and also by the "Operator" column (although this relationship is inactive)

I am trying to show a report in which you see for the column "Supervisor" in the DAILY table, the data of a third column ("Incidents" that is in "HISTORY") and also the data of "operator" in that same row.

I mean:

DAILY Table:

DateSupervisorOperative
07/11/22A1
07/11/22B2
07/11/22C3
07/11/22D4
07/11/22E5
07/11/22F6

HISTORICAL TABLE:

DateSupervisorOperativeIncidents
01/11/22A17
03/10/21A115
06/06/20A23
05/04/19A21
01/10/22B11
06/09/22B3

6

05/08/22B33
04/07/21C22
13/06/21C51
10/06/20C32
05/08/22D65
25/07/22D512

Desired result:

SupervisorOperativeIncidents SupervisorIncidents Operator
A126 (sum of incidents in HISTORICAL table for supervisor A)23 (sum of incidents in HISTORICAL table for Operator 1)
B210 (sum of incidents in HISTORICAL table for supervisor B)6 (sum of incidents in HISTORICAL table for Operator 2)
C355
D450

The sum of the supervisor there is no problem but as soon as I think about how to add the operator I do not get any report similar to what I have described.

Thanks for reading!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,

I have created a simple sample, please refer to it to see if it helps you.

Create meaures.

Incidents = CALCULATE(SUM(history[Incidents]),FILTER(ALL(history),history[Supervisor]=SELECTEDVALUE(daily[Supervisor])))
Supervisor1 = var _1= CALCULATE(SUM(history[Incidents]),FILTER(ALL(history),history[Supervisor]=SELECTEDVALUE(daily[Supervisor])&&history[Operative]=SELECTEDVALUE(daily[Operative])))
return
IF(_1=BLANK(),0,_1)

vpollymsft_0-1667876490895.png

 

If I have misunderstood your meaning, please provide mroe details with your desired output.

 

Best Regards

Community Support Team _ Polly

 

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
Anonymous
Not applicable

Hi @Syndicate_Admin ,

I have created a simple sample, please refer to it to see if it helps you.

Create meaures.

Incidents = CALCULATE(SUM(history[Incidents]),FILTER(ALL(history),history[Supervisor]=SELECTEDVALUE(daily[Supervisor])))
Supervisor1 = var _1= CALCULATE(SUM(history[Incidents]),FILTER(ALL(history),history[Supervisor]=SELECTEDVALUE(daily[Supervisor])&&history[Operative]=SELECTEDVALUE(daily[Operative])))
return
IF(_1=BLANK(),0,_1)

vpollymsft_0-1667876490895.png

 

If I have misunderstood your meaning, please provide mroe details with your desired output.

 

Best Regards

Community Support Team _ Polly

 

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

Syndicate_Admin
Administrator
Administrator

I didn't quite understand his solution.

The "HISTORICO" table has more than 300,000 records. According to your solution, would you have to duplicate some columns of this table (supervisory date) to make new relationships? I think that would make the report much heavier than it already is now.

I was trying to do something with the CALCULATE, FILTER and ALL functions but I did not get the expected result.

amitchandak
Super User
Super User

@Syndicate_Admin , Create common tables like supervisor and date and use them to create visuals

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solutio...

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors