Fabric is Generally Available. Browse Fabric Presentations. Work
towards your Fabric certification with the Cloud Skills Challenge.
I'm trying to create a column in which i want to compare two dates and if the two dates match, took the value from another column if the dates not exact match it gives the value of nearest date match.
Syed Muhammad Akber
Go to Solution.
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
You may create a calculated column or a measure as below.
Result Column =
var _diff1 = ABS(TODAY()-[Date1])
var _diff2 = ABS(TODAY()-[Date2])
Result Measure =
var _date1 = SELECTEDVALUE('Table'[Date1])
var _date2 = SELECTEDVALUE('Table'[Date2])
var _diff1 = ABS(TODAY()-_date1)
var _diff2 = ABS(TODAY()-_date2)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
View solution in original post
Could you please show us some sample data and expected result with One Drive for Business? Do mask sensitive data before uploading. Thanks.
var _d1 = today() - Table[Date1]
var _d2 = today() - Table[Date2]
_d1 = _d2, Table[Date3],
ABS(_d1) <= ABS(_d2), Table[Date1],
Check out the November 2023 Power BI update to learn about new features.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.