cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jonnyko
Regular Visitor

Cumulative count of bookings specific to each event/subset

Hi Community!

 

Trying to get my head around the correct DAX to essentially look at event takeup as the date of the event nears. The visual should be filterable by region of the event e.g. takeup of all the events hosted in London, date of the event, and by data points of the individuals making the booking e.g. their city of residence.

I have:

Fact_Bookings - master list of all bookings made by individuals to all events ever hosted. Includes date of signup, date of event, calculation of 'signup days in advance', bins of signup advance days (the variable I want on my X axis)  

Dim_Events - master list of all events ever hosted, and their maximum capacity. The unique ID for this is a concatenation of Location (non-unique) and Date (unique)

 

I've tried DAX on a calculated column to show, for each booking, what the event takeup is after that booking i.e. (cumulative bookings for that event / maximum capacity of event), attempted along the lines of

Cumulative bookings =

Calculate(

         Count(Fact_Bookings[user ID]),

         relatedtable(Dim_Events),

         Fact_Bookings[signup date] <= earlier(Fact_Bookings[signup date]))

 

but there's clearly things wrong with this, even as a count rather than as a % of the relevant event's max capacity.

 

Any help would be much appreciated, thanks!!

2 REPLIES 2
amitchandak
Super User
Super User

@jonnyko , I think you can create a new column like in Fact_Bookings

 

countx(filter(Fact_Bookings, Fact_Bookings[signup date] <= earlier(Fact_Bookings[signup date])),Fact_Bookings[user ID])

 

if not

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

It's not letting me post with a table because it says invalid HTML (no idea why). I've attached a screenshot of the data tables I'm working with and the desired column/calculation at the end instead hope that clarifies things for you?

 

jonnyko_0-1621437655940.png

 

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!