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'm looking for a dax formula for a calculated column, which searches by name and between two dates.
In the picture below the explanation. I'm looking for a DAX formula (calculated column) for the orange column in table_1.
I have found many similar questions with solutions on the internet. However, those solutions just don't work. I hope someone can help me with the final solution through this community site.
Thanks in advance for the help!
Bas.
Solved! Go to Solution.
Hi @brief001
You may try
VAR CurrentName = Table_1[Name]
VAR CurrentDate = Table_1[Date]
VAR FilterTable =
FILTER (
Table_2,
Table_2[Name] = CurrentName
&& Table_2[Date_Start] <= CurrentDate
&& Table_2[Date_End] >= CurrentDate
)
VAR Result =
MAXX ( FilteredTable, Table_2[Team] )
RETURN
Result
Thank you very much, this formula does indeed work. One note though, I had to change "MAXX ( FilteredTable, Table_2[Team] )" to "MAXX ( FilterTable, Table_2[Team] )".
Thank you, I am very happy to have been helped so quickly!
Hi @brief001
You may try
VAR CurrentName = Table_1[Name]
VAR CurrentDate = Table_1[Date]
VAR FilterTable =
FILTER (
Table_2,
Table_2[Name] = CurrentName
&& Table_2[Date_Start] <= CurrentDate
&& Table_2[Date_End] >= CurrentDate
)
VAR Result =
MAXX ( FilteredTable, Table_2[Team] )
RETURN
Result
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 |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |