Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
IDNR | SESSION_NAME | SESSION_CATEGORY |
1 | Session A | Friday |
1 | Session B | Friday |
2 | Session B | Saturday |
2 | Session C | Friday |
2 | Session D | Friday |
3 | Session A | Saturday |
Customer table
IDNR | BIRTHDAY | POSTAL CODE | PROFILE_CREATED |
1 | xx-xx-xxxx | xxxx | xx-xx-xxxx |
2 | xx-xx-xxxx | xxxx | xx-xx-xxxx |
3 | xx-xx-xxxx | xxxx | xx-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?
@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.
Proud to be a Super User! |
|
@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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |