Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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]
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
73 | |
42 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |