I am trying to display all workers with work hours greater than 40 per week but my formula seems to miss the mark. I’ll use this formula, when correct, to do a few other calculations, so this has to be in DAX.
I had looked at this example before but because you knew it would help, that pushed me to try the one formula in the example I did not try myself, and I can now see what I was missing:
A quick question to understand your example more fully. Why do you have the Total Hrs Employee by Week Measure, when the Total Hrs Employee by Week < 40 Measure works fine with just the Total Hours Measure since you use both the Name and Week Number in the visual?
Nice catch. The honest answer is that initially when I started working on a solution to this, I thought the additional iteration would be necessary and once I found a solution that worked I didn’t go back and optimize the DAX code to take out the unnecessary iteration. It does no harm (although in a big data set it would exact a performance hit), but you’re absolutely right that the visual provides sufficient evaluation/filter context to allow use of the simpler [Total Hours] measure.