Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Struggling with this, need some help. I have 2 tables, a headcount file and a calendar table. My calendar table only goes back to 1-1-2017.
I have created a Dax measure that correctly calculates the number of working days between the start date of their employement and the current date. However, I need this to be dynamic when I filter for month or year. Presently, the filter does not affect the calculation.
Been working on this one measure literally all day...
Here's my measure =
Hi @sublog ,
You could try to get the value of slicer using the SELECTEDVALUE function firstly. Then use the value as a date range.
Table =
VAR a =
SELECTEDVALUE ( 'Calendar'[Date] )
RETURN
IF (
ISFILTERED ( 'Calendar'[Date] ),
IF (
[Total Working Days]
< CALCULATE (
SUM ( 'Calendar'[Workingdays] ),
DATESBETWEEN ( 'Calendar'[Date], a, TODAY () )
),
[Total Working Days],
CALCULATE (
SUM ( 'Calendar'[Workingdays] ),
DATESBETWEEN ( 'Calendar'[Date], a, TODAY () )
)
)
)
If you can upload a dummy file, we will help you as soon as possible. If you can't, can you please share some sample data?
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |