Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi there,
I would like to create a new column, called Days_between_visits which calculates the number of days between a date in the ATA (Actual Time of Arrival) column and a previous date also in the ATA column, for each vessel in the VesselName column
For the first date of each vessel, Days_between_visits would be null as there is not previous date to calculate the difference with.
Is this possible? If so, please kindly assist with the DAX formula required the calculated column
Thanks,
Wes
Solved! Go to Solution.
I think this calculated column might be close
New Column = VAR LastVisit = MAXX( FILTER( 'Table', 'Table'[VesselName] = EARLIER('Table'[VesselName]) && 'Table'[ATA] < EARLIER('Table'[ATA])),'Table'[ATA]) RETURN IF(LastVisit <> BLANK(),INT('Table'[ATA] - LastVisit))
I think this calculated column might be close
New Column = VAR LastVisit = MAXX( FILTER( 'Table', 'Table'[VesselName] = EARLIER('Table'[VesselName]) && 'Table'[ATA] < EARLIER('Table'[ATA])),'Table'[ATA]) RETURN IF(LastVisit <> BLANK(),INT('Table'[ATA] - LastVisit))
@Phil_Seamark I found this solution very helpful, but I had 2 rows that did not return a value that should have. Do you know why this might of happened?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
82 | |
82 | |
70 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |