Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have Table2[dateBefore], Table1[dateBegin] and Table1[dateEnd].
So, I need to subtract the 3 dates, so I can have the result in DAYS: so something like Table2[dateBefore] - Table1[dateEnd] - Table1[dateBegin]
So, I create a new coloumn call DatesDiff = DATEDIFF(Table2[dateBefore], Table1[dateBegin], DAY) + DATEDIFF(Table2[dateBefore], Table1[dateEnd], DAY)
But the new coloumn call DatesDiff is create in Table1, so I can have acces to Table2[dateBefore].
How can I do if I want to subtract column from differents tables? I need to have an ID common to the 2 tables to do that?
Can I do that using join?
Please, give complete answer.
if all the IDs in those tables are unique, you can try to add a new step in table1
NewStep=Table.AddColumn(Table1,"DateDiff",each let a=Table2{[ID=[ID]]}?[dateBefore]? in a=null then null else Duration.Days(a-[dateEnd]-[dateBegin]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
27 | |
25 | |
25 | |
13 | |
9 |
User | Count |
---|---|
24 | |
19 | |
16 | |
13 | |
10 |