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.
I need Help writing the DAX statement equivalent to the if - then-else logic below
I am attempting to determine a BASE DATE by analyze dates I have in columns in my table
CARGOID RECEIVEDATE ORDER ASSIGN DATE FLEET DEALER BEGIN DATE BASE DATE
1234 09/01/22 08/31/22 09/01/22
9876 09/01/22 09/04/22 09/05/22 09/05/22
8888 09/01/22 09/04/22 09/05/22 09/05/22
5432 09/01/22 09/03/22 09/03/22
1122 09/01/22 09/01/22
If ORDER ASSIGN DATE Is Null then
BASE DATE = Receive Date
else
If ORDER ASSIGN DATE > Receive Date then
If [FLEET DEALER BEGIN DATE] Is Not Null And [FLEET DEALER BEGIN DATE > ORDER ASSIGN DATE then
BASE DATE =[ FLEET DEALER BEGIN DATE],
else
BASE DATE = ORDER ASSIGN DATE
end if
If {FLEET DEALER BEGIN DATE] Is Not Null And [FLEET DEALER BEGIN DATE] > Receive Date , then
BASE DATE = [FLEET DEALER BEGIN DATE],
else
BASE DATE = Receive Date
End if
end if
end if
I tried the below dax code but just can get it to work
John, Thank You for the quick
However what I am trying to do is create a measure based on the LOGIC I posted. The Logic is from an access program I have and I am trying to recreate the BASE DATE logic in DAX . So I am trying to see if anyone in the DAX forum group can assist in converting the logic I have posed to a DAX measure statement
If I understand correcly you want to create a new column which has the max value from 3 other columns on the same table for that row. You can add a column like
Base date =
MAXX (
{
'Table'[Receive Date],
'Table'[Order assign date],
'Table'[Fleet dealer begin date]
},
[Value]
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |