Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |