Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I have an database with 2 tables. Adres and AdresHistory. When the adres changes, the old address is copied to AdresHistory with the AdresID from Adres. In AdresHistory there is also a Start- and Enddate column (they do not overlap).
How to get the unique row AdresHistory data based on that dates? I need this unique one for a LOOKUPVALUE to get the actual Adres on a specific date. AdresHistory does not have a unique ID, but the tables are related.
The formula i'm now using:
_woonplaats =
if(Verrichting[_uitvoerDatum].[Date] >= Verrichting[_woonplaatsDatum].[Date],
LOOKUPVALUE(Adres[plaats],Adres[adresId],Verrichting[__getAdresid]),
LOOKUPVALUE(AdresHistory[plaats],AdresHistory[I'm looking for this, based on dates],Verrichting[__getAdresid]))
Thanks in advance.
Kind regards,
Jelle
Not sure what's your data model like, you may refer to below measure to get a specific address during a period from AddressHistory table.
OperationAddressHistory =
MAXX (
FILTER (
ALL ( AddressHistory ),
AddressHistory[AddressId] = MAX ( Operations[AddressId] )
&& AddressHistory[Start Date] <= MAX ( Operations[OperationDate] )
&& AddressHistory[End Date] >= MAX ( Operations[OperationDate] )
),
AddressHistory[Address]
)
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.