Help with adapting Current Staff calculations

@JBright,

Thanks very much for posting both your PBIX along with a clear explanation of your problem - that makes it much easier for those on the forum to provide support.

From an initial look at this I can see why you’re having so much trouble getting the DAX to work. However, the primary problem here is not DAX, it’s your data model. The way you’ve got it structured relying on the two bidirectional relationships introduces critical ambiguity into the model. Any calculation relying on dates can now take one of two paths - the path from the date table directly to the table being referenced in the calculation, or indirectly from the date table through the other table into the target table via the bidirectional relationships. This sort of ambiguity produces unreliable calculations - sometimes outwardly absurd results, and worse sometimes reasonable looking results that are just incorrect.

Here’s a great article that explains this ambiguity problem and its implications in detail:

What you’ll need to do first is rework your current data model into a star schema with only one- to-many unidirectional relationships. If you haven’t already, I would very strongly recommend working through this course start to finish, which will cover the key modeling and transformation concepts needed to revise your data model:

Here’s another excellent article that augments Sam’s video above well, discussing the importance of the star schema data model in Power BI:

See how you go with this. My experience is that once the right model is established, the DAX usually falls into place pretty easily. Give a shout if you have any questions.

I hope this is helpful.

  • Brian
1 Like