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.
Hello everyone,
How can I use the calculation of a measure without considering the filter of the relationship column between tables?
I have these two tables, Table Employee and Table Calendar.
Relationship: Day Worked ------ Date
The Day Worked column contains only the days the employee worked
The Date column contains all days of the year.
The column Business day considers 1 being (Monday to Friday) and 0 being (Saturday and Sunday).
Using the Dax measure below, I can count the working days for each period of time, but I would like this value to be locked for each filtered employee.
Business day by Employee = CALCULATE(COUNT('Table Calendar'[Date]); 'Table Calendar'[Business day] = 1)
It is possible?
Solved! Go to Solution.
Hi @Anonymous ,
Use the all formula on the calculation:
Business day by Employee = COUNTROWS(FILTER(ALLSELECTED('Table Calendar'); 'Table Calendar'[Business day] = 1))
Not on computer did this by heart may need some changes.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@Anonymous , if business day value is 1 and 0
the sum will give what you have in actual and the count will give what you have desired output
@Anonymous Try this:
Business day by Employee =
CALCULATE (
COUNT ( 'Table Calendar'[Date] ),
'Table Calendar'[Business day] = 1,
ALL ( TableEmploye )
)
Hi @Anonymous ,
Try modifying your dax as follows:
Business day by Employee = CALCULATE(COUNT('Table Calendar'[Date]); FILTER(ALL('Table Calendar'), 'Table Calendar'[Business day] = 1))
Thanks,
Pragati
Hi @Anonymous ,
Use the all formula on the calculation:
Business day by Employee = COUNTROWS(FILTER(ALLSELECTED('Table Calendar'); 'Table Calendar'[Business day] = 1))
Not on computer did this by heart may need some changes.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |