Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
freshwave
Helper I
Helper I

Calculate Open Events Using Date Ranges

We have a table that contains our events and we would like to be able to calculate how many open events per date to use on graphs.  We want to generate the open events for all calendar days, not only days that exist in the events table.  I can easily calculate this in excel which you can see from the attached image.  Maybe it is simple, though I can't seem to figure it out.

 

Any help would be appreciated.

 

 events example.png

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Maybe something like:

 

Measure = CALCULATE(COUNTROWS(Table),FILTER(Table,Table[BeginDate]>=MAX(Dates[Date]) && Table[EndDate] <= MAX(Dates[Date])))

Something like that.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Maybe something like:

 

Measure = CALCULATE(COUNTROWS(Table),FILTER(Table,Table[BeginDate]>=MAX(Dates[Date]) && Table[EndDate] <= MAX(Dates[Date])))

Something like that.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

events powerbi working.png

Thanks that worked well.  Guess the date table cannot have a relationship with the events table, otherwise it starts to filter down.

 

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.