Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have two tables like this:
Company | StartDate | EndDate | Regio |
a | 01/01/2020 | 08/08/2020 | Demo |
b | 01/01/2020 | 08/08/2020 | Demo |
c | 01/01/2020 | 08/08/2020 | Demo |
d | 01/01/2020 | 08/08/2020 | Demo |
d | 08/01/2020 | 08/10/2020 | Live |
d | 10/10/2020 | 01/12/2020 | Test |
e | 01/01/2020 | 08/08/2020 | Demo |
f | 01/01/2020 | 08/08/2020 | Demo |
g | 01/01/2020 | 08/08/2020 | Demo |
Company | LoginDate | regio |
a | 02/01/2020 | demo |
a | 03/01/2020 | demo |
b | 04/01/2020 | demo |
b | 05/01/2020 | demo |
c | 06/01/2020 | demo |
c | 07/01/2020 | demo |
d | 11/11/2020 | test |
d | 09/01/2020 | demo |
d | 10/01/2020 | demo |
e | 11/01/2020 | demo |
I need to add the regio in the second table by a double filter in the first table.
So I need to check the company and if the LoginDate is between start and end time. If so add regio to the second table.
How can i write the function in add column?
Solved! Go to Solution.
Hi @DionTN
Can you try as below please?
Column =
CALCULATE
(
SELECTEDVALUE(Table1[Regio]),
FILTER
(
Table1,
Table1[Company] = Table2[Company] &&
Table1[StartDate] <= Table2[LoginDate] &&
Table1[EndDate] >= Table2[LoginDate]
)
)
Hi @DionTN
Can you try as below please?
Column =
CALCULATE
(
SELECTEDVALUE(Table1[Regio]),
FILTER
(
Table1,
Table1[Company] = Table2[Company] &&
Table1[StartDate] <= Table2[LoginDate] &&
Table1[EndDate] >= Table2[LoginDate]
)
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
87 | |
85 | |
68 | |
67 | |
64 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |