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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
gladies123
Helper I
Helper I

Reg-how to use different two date fields in two different table

Hi,

 

I have a two different table that is table A and table B. i need to use two date field from two different tables but if i enable relationship for that dates Values will be changed. but the thing is if i use revenue date field as slicer  the revenue alone will   change and if i use date as slicer the CTC alone will  change but in tis case i need both revenue and CTC  have to change wiith respect to date which is common to Revenue and CTC

 

Thanks in AdvancePBI ISSUE.PNG

 

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

Hi @gladies123 ,

 

If you want to use one date slicer to control two tables, you need to create a date table and create relationships with other tables based on date.

We can use two ways to meet your requirement, one creates a measure, another creates a column in Table B.

 

1. Create a date table and create the relationships.

 

Date = CALENDAR("2020/5/1","2020/6/30")

 

REG1.jpg

 

2. Then create a slicer using it.

 

reg2.jpg

 

The measure solution is to create a measure like this,

 

Measure = 
CALCULATE(SUM('Table A'[Revenue]),FILTER('Table A','Table A'[S.no]=MAX('Table B'[S.no]) && 'Table A'[Revenue Date]=MAX('Table B'[Date])))

 

reg3.jpg

 

The column solution is to create revenue column in Table B.

 

Column = 
CALCULATE(SUM('Table A'[Revenue]),FILTER('Table A','Table A'[S.no]='Table B'[S.no] && 'Table A'[Revenue Date]='Table B'[Date]))

 

reg4.jpg

 

The final result like this,

 

reg5.jpg

 

reg6.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, PBIX as attached.

View solution in original post

2 REPLIES 2
v-zhenbw-msft
Community Support
Community Support

Hi @gladies123 ,

 

If you want to use one date slicer to control two tables, you need to create a date table and create relationships with other tables based on date.

We can use two ways to meet your requirement, one creates a measure, another creates a column in Table B.

 

1. Create a date table and create the relationships.

 

Date = CALENDAR("2020/5/1","2020/6/30")

 

REG1.jpg

 

2. Then create a slicer using it.

 

reg2.jpg

 

The measure solution is to create a measure like this,

 

Measure = 
CALCULATE(SUM('Table A'[Revenue]),FILTER('Table A','Table A'[S.no]=MAX('Table B'[S.no]) && 'Table A'[Revenue Date]=MAX('Table B'[Date])))

 

reg3.jpg

 

The column solution is to create revenue column in Table B.

 

Column = 
CALCULATE(SUM('Table A'[Revenue]),FILTER('Table A','Table A'[S.no]='Table B'[S.no] && 'Table A'[Revenue Date]='Table B'[Date]))

 

reg4.jpg

 

The final result like this,

 

reg5.jpg

 

reg6.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, PBIX as attached.

amitchandak
Super User
Super User

@gladies123 , You can use a common date table and join with both the tables and use it?

same way common table for the person and Sno, if needed

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.