Latest Enterprise DNA Initiatives

Calculating Car Park Occupancy (Again)

After reading the blog by Matt Allington, I thought I could possibly use his DAX to help with my issue of car park occupancy. It turns out, that my data is more subtle than this.

I think a “perpetual inventory” approach is required where;

  1. I write a measure that calculates the cumulative number of vehicles entering without regards for those leaving.
  2. Then write a measure that calculates the cumulative number of vehicles leaving without regards for those entering

and then subtract 2 from 1 to get the current total in the carpark (sorting by date).

Is this possible and how?

I have uploaded a sample PBIX file to look at.Sample Occupancy.pbix (239.3 KB)

1 Like

@chrisgreenslade,

There is a plethora of content on the portal site about calculating cumulative totals:

https://forum.enterprisedna.co/search?expanded=true&q=%23enterprise-dna-online%20cumulative%20total

I recommend you dig into this content and then try to work through the calculation on your own first.

Because there are so many more people asking questions than providing solutions, the forum can only work as a partnership. The implicit bargain we all strike is this: those of us providing solutions will attempt to provide thorough solutions and detailed explanations that will aid you in your learning, and on the other side those asking questions will attempt to use all the resources available to them to try to solve the problem on their own first, using the forum as a mode of last resort when they are completely stuck.

There are nearly 800 separate videos in the Enterprise DNA learning portal, dealing with a vast range of topics. In addition, there are tens of thousands of posts on the forum, so many questions have already been asked and answered. The two sections at the top of the forum do a nice job explaining how best to search the previous posts to help find the answers you’re looking for:

If after going through the existing material, you still are unable to get to a solution then by all means post your PBIX work in progress file to the forum, and we will be glad to help.

  • Brian
5 Likes

Thanks Brian,

Yes, seeing an attempt in your post would help everyone involved here. And you might find that this will be solved very quickly if that is done.

Chrs
Sam

1 Like

Hi @chrisgreenslade, did the response provided by @BrianJ help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query.

We’ve recently launched the Enterprise DNA Forum User Experience Survey, please feel free to answer it and give your insights on how we can further improve the Support forum. Thanks!