Forum Discussion
Help with Dynamic DAX Measure
- Anonymous6 years ago
Hi, I am so sorry I must have missed your last reply/solution.
At the end, this is what I used:
Total Work Mins = [Total Number of Employees]*480 (=8x60=No. of work mins in a day)*[Number of Weekdays Selected]
where
Number of Weekdays Selected = var MinDate = MIN(Date_Calendar[Date])
var MaxDate = MAX(Date_Calendar[Date])
return CALCULATE(DISTINCTCOUNT(Date_Calendar[Date]),'Date_Calendar'[Date]<MaxDate,'Date_Calendar'[Date]>=MinDate,Date_Calendar[IsWeekday]=1)
We would need to see some data, but Power BI, by default, will filter all measures down to what you have selected. You don't need different measures for different filter conditions. They are always, by definition, dynamic. What gets tricky is telling a measure to ignore filters. The denominator of a ratio, for example, would need to do that. Still dynamic, but you are overriding certain aspects of it.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum