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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
asn4293
New Member

Event calendar: Next event and previous event

I am stuck in building the event calendar but in concise view. It should show me by stakeholder what was the last event and what will be the next event for the respective stakeholder. Below you will find the solution how it should look like. 

Stakeholder groupCurrent Engagement levelLast EventLast Event DateNext Event Next Event date
A1Board Meeting20.11.2022Board brainstorming01.01.2023
B1Leadership meeting19.11.2022Leadership comms02.01.2023
C2Offsite hangout20.10.2022On site discussion03.01.2023
D2Strategic communication15.11.2022Global comms 15.01.2023

 

 

And the data looks like this 

EventStakeholder GroupStart DateEnd Date
Board MeetingA21. Okt 2221. Okt 22
Board talksA04. Okt 2210. Nov 22
Board MeetingA20. Nov 2220. Nov 22
Board brainstormingA01. Jan 2301. Jan 23
Board MeetingA04. Jan 2304. Jan 23
Leadership MeetingB19. Nov 2219. Nov 22
Leadership talksB10. Nov 2215. Nov 22
Leadership commsB02.01.202302.01.2023

 

So in theory what I need a formula which can give 

1) Next event definition:
Where End date is greater than today and minimum of End date date based on stakeholder

2) Last event definition:
Where End date is less than today and maximum of end date based on stakeholder 




 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @asn4293 ,

 

Here I create a sample to have a test.

Data model:

RicoZhou_0-1669193660014.png

Last Event = 
CALCULATE(MAX('Table'[Event]),FILTER('Table','Table'[End Date] = [Last Event Date]))
Last Event Date =
CALCULATE (
    MAX ( 'Table'[End Date] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Stakeholder Group] = MAX ( 'Table (2)'[Stakeholder group] )
            && 'Table'[End Date] <= TODAY ()
    )
)
Next Event = 
CALCULATE(MAX('Table'[Event]),FILTER('Table','Table'[End Date] = [Next Event Date]))
Next Event Date =
CALCULATE (
    MIN ( 'Table'[End Date] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Stakeholder Group] = MAX ( 'Table (2)'[Stakeholder group] )
            && 'Table'[End Date] > TODAY ()
    )
)

Result is as below.

RicoZhou_1-1669193772736.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
asn4293
New Member

@Anonymous  Thank you so much 

Anonymous
Not applicable

Hi @asn4293 ,

 

Here I create a sample to have a test.

Data model:

RicoZhou_0-1669193660014.png

Last Event = 
CALCULATE(MAX('Table'[Event]),FILTER('Table','Table'[End Date] = [Last Event Date]))
Last Event Date =
CALCULATE (
    MAX ( 'Table'[End Date] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Stakeholder Group] = MAX ( 'Table (2)'[Stakeholder group] )
            && 'Table'[End Date] <= TODAY ()
    )
)
Next Event = 
CALCULATE(MAX('Table'[Event]),FILTER('Table','Table'[End Date] = [Next Event Date]))
Next Event Date =
CALCULATE (
    MIN ( 'Table'[End Date] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Stakeholder Group] = MAX ( 'Table (2)'[Stakeholder group] )
            && 'Table'[End Date] > TODAY ()
    )
)

Result is as below.

RicoZhou_1-1669193772736.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

asn4293
New Member

Hi @amitchandak would you be able to help me here I saw some solutions of yours but it does not work here

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.