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

Association and required a common filter between two tables

Hi,

 

I have 3 table i.e., Table 1 , Table 2 and Calendar.Dataset.png

 

Provided the data model, I have a requirement where i need to associate based on Date. 

DataModel.png
The output which i am looking for is when i select July 1 i would like to divide numerator with Denominator. So when i select "AL" in type i want 5/2=2.5.  The problem is i have Type column in both the table, but i want a single column "Type" and if is select that it should give 5/2=2.5. But now i am selecting both (Table1 and Table2) the "type" filter to get 5/2.

Output.png
If i select Type = AL from table 1 then it is filtering out for table 1 alone. (Not getting the required output)
1 filter.png
If i select Type = AL from table 2 then it is filtering out for table 2 alone. (Not getting the required output)
2 filter.png

 

1 ACCEPTED SOLUTION

Measure = 
VAR __type = MAX('Table 1'[Type])
RETURN
IF(HASONEVALUE('Table 1'[Type]),SUMX(FILTER('Table 2',[Type] = __type),[Denominator]),SUMX('Table 2',[Denominator]))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

So, you are probably going to want a measure like:

 

Measure = 
VAR __type = MAX('Table 1'[Type])
RETURN
SUMX(FILTER('Table 2',[Type] = __type),[Denominator])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks for your help!!

We are getting closer but when i select one date and not selected any "Type" filter at that time it is taking only max values not both.
I want 10/5 without selecting any "Type" filter for July 1 but now it is showing 10/3.Little Mistake.png

Measure = 
VAR __type = MAX('Table 1'[Type])
RETURN
IF(HASONEVALUE('Table 1'[Type]),SUMX(FILTER('Table 2',[Type] = __type),[Denominator]),SUMX('Table 2',[Denominator]))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks!! It is working fine.

AL.pngALL.pngBoth.pngSNF.png
I got the output with sample records. Let me try it with Original dataset. Thansk for your help again!!!

No problem, happy to help! 🙂



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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