Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Solved! Go to Solution.
These look like definitions for calculated columns rather than measures.
I think I'd try something like this:
SALARY during period =
VAR periodStart =
MAX (
MIN ( 'Salary History'[Effective Date] ),
MIN ( 'Date'[Date] )
)
VAR periodEnd =
MIN (
MAX ( 'Salary History'[Effective Date] ),
MAX ( 'Date'[Date] )
)
VAR daysInPeriod =
CALCULATE (
COUNTROWS ( 'Date' ),
DATESBETWEEN ( 'Date'[Date], periodStart, periodEnd ),
'Date'[Is WeekDay] = TRUE
)
RETURN
daysInPeriod * [Daily Salary]
These look like definitions for calculated columns rather than measures.
I think I'd try something like this:
SALARY during period =
VAR periodStart =
MAX (
MIN ( 'Salary History'[Effective Date] ),
MIN ( 'Date'[Date] )
)
VAR periodEnd =
MIN (
MAX ( 'Salary History'[Effective Date] ),
MAX ( 'Date'[Date] )
)
VAR daysInPeriod =
CALCULATE (
COUNTROWS ( 'Date' ),
DATESBETWEEN ( 'Date'[Date], periodStart, periodEnd ),
'Date'[Is WeekDay] = TRUE
)
RETURN
daysInPeriod * [Daily Salary]
@Anonymous , if you want to use that you need to use max.
I think you need move that to filter clause
IF(max('Salary History'[Effective Date])<=LASTDATE('Date'[Date]), IF(max('Salary History'[Effective Date])>=FIRSTDATE('Date'[Date]), 'Salary History'[Effective Date], FIRSTDATE('Date'[Date])))
VAR periodEnd = IF(OR(ISBLANK(max('Salary History'[End Date])), max('Salary History'[End Date])>=FIRSTDATE('Date'[Date])), IF(ISBLANK(max('Salary History'[End Date])), LASTDATE('Date'[Date]), IF(max('Salary History'[End Date])<=LASTDATE('Date'[Date]),max('Salary History'[End Date]), LASTDATE('Date'[Date]))))
Example filter , check current employee
Thanks for replying. Unfortunately I get the same performance issue as when I tried SELECTEDVALUE. I think I need to find a different way to filter the dates.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |