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

Date relationship with condition

Hi,

 

In my data table there are  separate close dates for opportunities and close dates for quotations.

In power query I combined these close dates into one column

 

"ClosePossibleDate", each if [SalesPhase] = "Opportunity" then [close_date] else if [SalesPhase] = "Quotation" then [date_possible] else null).

 

In the data model Quotations are linked to Opportunities when they have the same id key.

In Power BI I want to present the Close date of a quotions or opportunity when there is no quotation

 

Opportunity - Quotation: Close Date Quotation

Opportunity -  Empty: Close Date Opportunity 

Empty - Quotation: Close Date Quotation

 

As the close dates are linked to both opportunity and quotations the values are presented double.

 

Close Possible Date|          Opp. | Quotation

1-11-2019               Serial O123 | Serial Q123

1-12-2019               Serial O123 | Serial Q123

 

This should be: 

1-12-2019           Serial O123   | Serial Q123

 

 

Thanks

 

 

 

 

 

 

1 REPLY 1
amitchandak
Super User
Super User

Try getting the date from the parent table to child table like this and then develop rest. As a new Column

 

  date from date = CALCULATE(MAX('Order'[Order Date]))

 

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.