Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi,
Bit of an odd one! I have a dataset which includes 2 x date columns, 'test date' and 'concessed date' I would like to create a new column called 'master date' which looks at the other 2 columns and gives the furthest date in the future. But there is a clause, there could be blanks in either column and in most instances where there is a date in both columns the concessed date is furthest in the future. But I have found a couple of instances where the test date and concessed date are populated and the concessed date is earlier, if this happens I need the earlier concessed date to be master instead.
I guess the easiest way to put it, master date to be the furthest date in the future unless concessed date comes first. Some sample data below.
Solved! Go to Solution.
SWITCH (
TRUE (),
ISBLANK ( 'Table'[Concessed Date] ) && ISBLANK ( 'Table'[Test Date] ), TODAY(),
ISBLANK ( 'Table'[Concessed Date] ), 'Table'[Test Date],
ISBLANK ( 'Table'[Test Date] ), 'Table'[Concessed Date],
'Table'[Concessed Date] < 'Table'[Test Date], 'Table'[Concessed Date],
MAX ( 'Table'[Test Date], 'Table'[Concessed Date] )
)
If this now works, please accept as the solution for others with the same challenge.
@_Kelz0484 - Try this as a calculated column:
MAX( Table[Test Date], Table[Concessed Date] )
It will ignore blanks and always give you the latest date from both columns.
If this works, please accept as the solution for others with the same challenge.
Hi, this is similar to what I am already using and yes it works for giving me the latest date but it doesn't help with the odd instances where the earlier concessed date is found.
Thanks!
@_Kelz0484 - Sorry I misread your requirement the below will now work:
SWITCH (
TRUE (),
ISBLANK ( 'Table'[Concessed Date] ), 'Table'[Test Date],
ISBLANK ( 'Table'[Test Date] ), 'Table'[Concessed Date],
'Table'[Concessed Date] < 'Table'[Test Date], 'Table'[Concessed Date],
MAX ( 'Table'[Test Date], 'Table'[Concessed Date] )
)
If this now works, please accept as the solution for others with the same challenge.
That is perfect but now I've noticed that I have a lot of entries where both dates are blank. How would I populated these with today's date. I thought it would simply adding TODAY() as the final result but that didn't work.
SWITCH (
TRUE (),
ISBLANK ( 'Table'[Concessed Date] ) && ISBLANK ( 'Table'[Test Date] ), TODAY(),
ISBLANK ( 'Table'[Concessed Date] ), 'Table'[Test Date],
ISBLANK ( 'Table'[Test Date] ), 'Table'[Concessed Date],
'Table'[Concessed Date] < 'Table'[Test Date], 'Table'[Concessed Date],
MAX ( 'Table'[Test Date], 'Table'[Concessed Date] )
)
If this now works, please accept as the solution for others with the same challenge.
Hi mark_endicott
That's perfect - exactly what I was looking for!
Thanks so much for your help.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |