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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
skavan
Frequent Visitor

Dynamic Frequency Distribution (Across 2 Tables)

Hi,

Banging my head on the wall on this one.

I have Table A (simplified) - which is a master list of users:

user_id

and Table B - which is a detail of games played over time by users (simplified):

game_id
user_id
play_date

A user may have multiple entries in Table B.

The tables are linked, one to many, on user_id.

 

I want to show, for a given date range (play_date, set as a Visual Filter), the played game frequency distribution. i.e. Over the last 30 days, 5 people have played 2 times, 11 people have played 3 times etc...

 

It's easy enough to get the computed data into a table by dropping in a field from Table B and simply using Count.

 

It's also easy to create a measure in Table A with the data:

games_played = COUNTROWS(RELATEDTABLE('Table B'))

But - using a histogram, or a bar chart, I can't use the measure, nor can I seem to use a computed data value.

The result should be something like the below, which tells me that most users play once or twice per period. The trick is also, that the period, as mentioned above should be a visual filter, so I can show multiple charts over different date ranges!

 

freq_dist.png

 

 

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@skavan ,

 

I'm afraid measures can't be placed to the X-axis section in a histogram visual. You should use calculate column instead.

 

Regards,

Jimmy Tao

calculated column (as I understand it, is not dynamic and so won't recalc based on filters or am I misunderstanding something?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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