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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.