Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am new to DAX calculations.
I know that I can calculate the maximum [Date1] independent of filters like this:
[MAX Date] = CALCULATE( MAX( MyTable[Date1] ), ALL( 'MyTable' ) )
My problem is that I have 4 different date columns [Date1], [Date2], [Date3], [Date4] and I want to return the maximum date among them. Note that any filter must be ignored.
Please advise.
Regards
Solved! Go to Solution.
Without unpivoting your date column, I can't think of a way around calculating each separately and then finding the maximum among the maximums.
MAX Date =
VAR Max1 = CALCULATE ( MAX ( MyTable[Date1] ), ALL ( 'MyTable' ) )
VAR Max2 = CALCULATE ( MAX ( MyTable[Date2] ), ALL ( 'MyTable' ) )
VAR Max3 = CALCULATE ( MAX ( MyTable[Date3] ), ALL ( 'MyTable' ) )
VAR Max4 = CALCULATE ( MAX ( MyTable[Date4] ), ALL ( 'MyTable' ) )
RETURN
MAX ( MAX ( Max1, Max2 ), MAX ( Max3, Max4 ) )
Without unpivoting your date column, I can't think of a way around calculating each separately and then finding the maximum among the maximums.
MAX Date =
VAR Max1 = CALCULATE ( MAX ( MyTable[Date1] ), ALL ( 'MyTable' ) )
VAR Max2 = CALCULATE ( MAX ( MyTable[Date2] ), ALL ( 'MyTable' ) )
VAR Max3 = CALCULATE ( MAX ( MyTable[Date3] ), ALL ( 'MyTable' ) )
VAR Max4 = CALCULATE ( MAX ( MyTable[Date4] ), ALL ( 'MyTable' ) )
RETURN
MAX ( MAX ( Max1, Max2 ), MAX ( Max3, Max4 ) )
Thank you Alexis for your quick help!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |