Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have two tables:
Table 1 have a collunm production-date.
DATEPRODUCTION | PRODUCTION |
2023-06-12 | 3 |
2
In Table 2, i have 3 collunms, the first collum is the round, the second collunm is the round start date, and the third is the round finish date.
ROUND | START_DATE | END_DATE |
2 | 2023/06/12 | 2023/06/28 |
3 | 2023/06/29 | 2023/07/12 |
I want to create a collunm in the Table 1, that have the round where that event occurs.
DATEPRODUCTION | PRODUCTION | ROUND |
2023-06-12 | 3 | 2 |
How to compare these date columns and understand that something happened between the start date and the end date, and return the round number where this event occurred?/
Solved! Go to Solution.
Hi @Daniel_Rocha14
Please try the following DAX in a new column in table 1
ROUND =
VAR __DATE = Table1[DATEPRODUCTION]
RETURN
CALCULATE( MIN( Table2[ROUND] ),
__DATE >= Table2[START_DATE] &&
__DATE <= Table2[END_DATE]
)
Hi @Daniel_Rocha14
Please try the following DAX in a new column in table 1
ROUND =
VAR __DATE = Table1[DATEPRODUCTION]
RETURN
CALCULATE( MIN( Table2[ROUND] ),
__DATE >= Table2[START_DATE] &&
__DATE <= Table2[END_DATE]
)
it work exactly like i wanted, thank you a lot!!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
52 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |