Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I have a table visual that contains some measures. It has six columns, contact, company, last event, next event, pipeline phase and profit.
Last event and next event are calculated measures.
I created a slicer dropdown for contact but the contacts in the underlying table are also showing in the dropdown. What is the best way to get around this so only John and George would be shown in the contact slicer dropdown? Thanks for the support.
Here's the Table.
Contact | Session | Event | Participation | Start date | Group | Pipeline phase | Profit | Status | Company |
John L | Lunch | Event 1 | Yes | 30.12.2020 00:00 | HYL-Commerce | 1-Qualify | 4000 | Invited | Company 1 |
John L | Breakfast | Event 2 | Yes | 31.12.2020 08:00 | HYL-Commerce | 1-Qualify | 4000 | Invited | Company 1 |
John L | Evening Meal | Event 3 | No | 31.12.2020 08:00 | HYL-Commerce | 1-Qualify | 4000 | Invited | Company 1 |
John L | Supper | Event 4 | No | 29.11.2020 08:00 | HYL-Commerce | 1-Qualify | 4000 | Invited | Company 1 |
John L | Brunch | Event 5 | Yes | 29.11.2020 08:00 | HYL-Commerce | 1-Qualify | 4000 | Invited | Company 1 |
George | Afternoon tea | Event 6 | Yes | 27.06.2020 08:00 | 1-Qualify | Invited | Company 2 | ||
Paul | Morning tea | Event 7 | No | 01.10.2020 08:00 | 1-Qualify | Invited | Company 3 | ||
Ringo | Snack | Event 8 | No | 03.12.2020 08:00 | Invited | Company 4 |
The measure for last Event is:
Thanks.
Hi @jimmyfromus ,
Best Regard
Lucien Wang
Last event =
VAR _lastpdate =
CALCULATE (
MAX ( 'Table'[Start date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "Yes"
)
)
VAR _lastpevent =
CALCULATE (
MAX ( 'Table'[Session] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "Yes"
&& 'Table'[Start date] = _lastpdate
)
)
RETURN
( _lastpevent )
Next event =
VAR _nextpdate =
CALCULATE (
MAX ( 'Table'[Start date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "No" && 'Table'[Pipeline phase]<>BLANK()
)
)
VAR _nextpevent =
CALCULATE (
MAX ( 'Table'[Session] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "No"
&& 'Table'[Start date] = _nextpdate &&'Table'[Pipeline phase]<>BLANK()
)
)
RETURN
( _nextpevent )
If the value in Lastevent is blank ,then input the value in Nextevent column ,I create a measure for finalevent is:
Final event =
VAR _lastpdate =
CALCULATE (
MAX ( 'Table'[Start date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "Yes"
)
)
VAR _lastpevent =
CALCULATE (
MAX ( 'Table'[Session] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "Yes"
&& 'Table'[Start date] = _lastpdate
)
)
VAR _nextpdate =
CALCULATE (
MAX ( 'Table'[Start date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "No" && 'Table'[Pipeline phase]<>BLANK()
)
)
VAR _nextpevent =
CALCULATE (
MAX ( 'Table'[Session] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contact] = MAX ( 'Table'[Contact] )
&& 'Table'[Participation] = "No"
&& 'Table'[Start date] = _nextpdate &&'Table'[Pipeline phase]<>BLANK()
)
)
Var finalevent=
IF(_lastpevent<>BLANK(), _lastpevent, _nextpevent)
RETURN
( finalevent)
Finally you will see:
Best Regards,
Lucien
@jimmyfromus you can create another measure with the logic and return 1 or 0 and use that measure in the filter.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I'm not too sure how to do that. Do I have to create a separate table for that?
@jimmyfromus you can have a visual level filter on the slicer with one of the measure with condition where measure value is not blank
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k Thanks, yeah that's correct. But I'm looking to exactly reflect the table in the dropdown. If for example, I filter for last event is not blank, then it wouldn't pick up the value where it's value is blank and there is a value in the next event column. I would like to have just 3 people to appear in the dropdown list as below, is that possible? Thank you again, I value the support.
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |