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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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