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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Dax | Calculate the date using the two different Table.

Hi ,

I have two column in Table A :Contract Line - Column: Contract Start Date and CREATED_TIMESTAMP  and

          One column in Table B: Date - Column: Date,

 

I need to caluclate the date like below if condition using Dax or new column in Table B.  Please guid me how to achive it.

 

Active Date = IF (
'Date'[Date] >= 'Contract Line'[Contract Start Date],
'Contract Line'[CREATED_TIMESTAMP],
IF (
'Contract Line'[CREATED_TIMESTAMP] < 'Contract Line'[Contract Start Date],
'Contract Line'[Contract Start Date] )
 
Thank you,
Ab
3 REPLIES 3
Anonymous
Not applicable

Thanks for response,

 

I am looking for Dax fomula. I am trying to add new column generate date which combines from two different table.

'FACT Contract Line' and BZ vw_DIM_DATE. I have joined the two table with 
'FACT Contract Line'[CREATED_TIMESTAMP] and BZ vw_DIM_DATE[Date]. I want below Dax to work, but is getting error. Is there any other Method or Correct DAX Formula you can suggest. 

 

Screen Shot 2020-11-16 at 10.48.19 AM.png

 

Thank you,

Ab

@Anonymous  plase try RELATED(BZ vw_DIM_DATE[Date]) in calculated column if these two table have a one-many relationship

amitchandak
Super User
Super User

@Anonymous , Not very clear. But seem like very similar to HR usecase.

Please refer

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

Video: https://www.youtube.com/watch?v=e6Y-l_JtCq4

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.