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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

how to join 3 tables and calculate distinct values from them

Hi,

i have below requirement

 

i have four tables 

 

Dim1 (key,id)

Dim2(Key1,Eff_date,Termin_date)

Fact(key,key1)

Date(Start_date,End_date)

 

Relationship

 

Dim1[key]=fact[key]

Dim2[Key1]=fact[key1]

Dim2[Eff_date]=Date[Start_date]

 

Slicers:

1 st is 'after' slicer on start_date and 2 nd slicer is 'before' slicer on end_date

 

I want to count distinct id of dim1 where effective date and termination date of dim2 are as per user selection

e.g Eff_date<start_date and Termin_date<end_date

 

I want to create such measure which calculates distinct id based on date filters.

 

sample data

dim1

key|id

1|5

2|5

3|6

4|6

 

fact is empty

key1|key

 

dim2

key1|eff_date|termin_date

101|01-02-2016|01-02-2018

102|02-02-2016|02-02-2018

103|03-02-2016|13-02-2018

 

date

start_date|end_date

both columns have values from 01-01-2015 to 01-01-2020

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may take a look at the following posts.

Community Support Team _ Sam Zha
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

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may take a look at the following posts.

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

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.