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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Maarten_duijn
Regular Visitor

Count event visitors visiting multiple event sessions

I would like to create a measure which counts the amount of event visitors who visited a selected session and the visits to other event sessions. My data looks like this

 

session table

IDNRSESSION_NAMESESSION_CATEGORY
1Session AFriday
1Session BFriday
2Session BSaturday
2Session C

Friday

2Session D

Friday

3Session A

Saturday

 

Customer table

IDNRBIRTHDAYPOSTAL CODEPROFILE_CREATED
1xx-xx-xxxxxxxxxx-xx-xxxx
2xx-xx-xxxxxxxxxx-xx-xxxx
3xx-xx-xxxxxxxxxx-xx-xxxx

 

I would like to visualize a bar chart which shows the cross-sell so to say between the sessions. When Session B is chosen in slicer it needs to show:

 

Session A  1

Session C  1

Session D  1

 

Anyone who can help me with this?

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Maarten_duijn ,Ensure there is a relationship between the session table and customer table based on the IDNR column.

You need to create a measure that counts the number of visitors who attended a selected session and other sessions.

 

DAX
CrossSellCount =
VAR SelectedSession = SELECTEDVALUE('session table'[SESSION_NAME])
RETURN
CALCULATE(
COUNTROWS('session table'),
FILTER(
'session table',
'session table'[IDNR] IN
CALCULATETABLE(
VALUES('session table'[IDNR]),
'session table'[SESSION_NAME] = SelectedSession
) &&
'session table'[SESSION_NAME] <> SelectedSession
)
)

 

Add a bar chart to your report.
Drag SESSION_NAME from the session table to the Axis field.
Drag the CrossSellCount measure to the Values field.
Add a Slicer:

Add a slicer to your report.
Drag SESSION_NAME from the session table to the slicer field.
Filter the Bar Chart:

Ensure the bar chart is filtered by the slicer selection.

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






@bhanu_gautam Thanks for your quick response, I tried the measure but do not see any counts in the bar chart when selecting a session in the slicer. See below

Screenshot 2024-09-13 at 10.35.16.pngScreenshot 2024-09-13 at 10.35.45.png

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.