The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have two tables, 'TeeTimes' and 'Closures' with data that I would like to compare.
The "Budget Tee Date" in the 'TeeTime' table to see if it falls between the 'Closure' tables "Close Date" and "Open Date". Then put the value of "Closure Type" from the 'Closure' table into the "Open/Close" column of the 'TeeTimes' table or simply the text value "Open" if no conflicts with the closures.
Department is a common field in both tables.
Table views
Relationship
Thanks in advance!
Solved! Go to Solution.
@dmgebauer Maybe:
Open/Close Column =
VAR __Dept = [Dept]
VAR __Course = [Course]
VAR __BudgetTeeDate = [Budget Tee Date]
VAR __Table = FILTER(ALL('Closures'), __BudgetTeeDate >= [Close Date] && __BudgetTeeDate <= [Open Date])
VAR __ClosureType = MAXX(__Table, [Closure Type])
VAR __Result = IF( __ClosureType = BLANK(), "Open", __ClosureType)
RETURN
__Result
@dmgebauer Maybe:
Open/Close Column =
VAR __Dept = [Dept]
VAR __Course = [Course]
VAR __BudgetTeeDate = [Budget Tee Date]
VAR __Table = FILTER(ALL('Closures'), __BudgetTeeDate >= [Close Date] && __BudgetTeeDate <= [Open Date])
VAR __ClosureType = MAXX(__Table, [Closure Type])
VAR __Result = IF( __ClosureType = BLANK(), "Open", __ClosureType)
RETURN
__Result
Close! but I will need to have the result based on the matching departments by each specific closure date range. Current formula seems to be applying a closure to all departments not the matching department.
Looks like it is working with this update
User | Count |
---|---|
80 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
60 | |
49 | |
49 |