Forum Discussion
Help with DAX
Small correction in the dax
IF ( SUM ( 'Table'[Late_hours] ) =0, "Not Late" ,"Late")
- AndyDD_UK3 years agoHelper III
Thanks, but my answer is still as above. That will return "Late" or "Not Leve" at row level where each row represents one employee and week
I need to summarize by employee based on the weeks selected.
- tamerj13 years agoCommunity Champion
The problem is that I don't see how your visual looks like therefore I assumed that you are interested to show for each employee, the status (late or not late based on the weeks selected (from week or month slicer). In this case I guess there is no need for the weeks to exist in the table visual therefore if the sum is more than zero for any employee within the selected period that means the employee has late hours within that selected period. The simple sum measure should work just fine. If for dome reason you want to keep the week column in the table visual and you want to reflect the status of the selected period over of of the selected weeks the you can use
IF ( CALCULATE ( SUM ( 'Table'[Late_hours] ), ALL ( 'Table'[Week] ) ) =0, "Not Late" ,"Late")
- AndyDD_UK3 years agoHelper III
Thanks tried that as a calculated column and it's still at row level.
My visual is a matrix. Column A is "Compliance', Column B is employee name and columns are months/weeks.
If I create calculation as DAX measure I can't show it in Column A. Thanks, hope you can help?