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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
lienbrusselaers
Frequent Visitor

Segmentation of user based on dimensions

Hi all,

 

 

I'm working on the segmentation of our users. I want to create a graph that has months (the months in which they used the platform) on the X-axis, the hours they used the platform on the Y-axis. The legend has to show the segments: users that created a paying account in September, users that created a paying account in October and so on. With this, I would like to determine whether users that have registered in September, mainly use the platform in September/October or whether they use it in the following months as well. 

So, based on when users became paying users, which can be derived from the fact_account_state table, I want to check out how these groups used our platform, which can be derived from fact_usage_event. So my question would become this: how can I segment my users based on the data in one fact table (fact_account_state_transition), and use these segments to create a legend for another fact table (fact_usage_event).

Datamodel.PNG

This is what my data model looks like. So from the information in the Fact_Account_State I want to create groups filtered on the Dim_Account_State (here I can select all my paying users) that became paying in a certain month based on the Calendar table (here I can select the correct month). 

 

This is what's in the tables:

Fact Account State Transition   
TimestampDateIDUserIDSource Account StateTarget Account State
12/02/2019 12:3411FreePaying
12/02/2019 17:2112VisitorPaying
13/02/2019 09:4523VisitorFree
13/02/2019 22:0924FreePaying

As you can see there are two relationships between the Fact_Account_State_Transition and Dim_Account_State. The one that is the target account state is active.

This is the date dimension:

Dim_Date 
Date IDDate
112/02/2019
2

13/02/2019

This is the calendar table:

Calendar  
DateMonthNumberMonthName
12/02/20192February
13/02/20192February

This is the account state table:

Dim Account state  
Account State IDAccount State Name
1Init 
2Visitor 
3Free 
4Paying 
5Churn 

This is the usage fact:

Fact_Usage_Event    
UserIDHourspendAccount StateTimestampDateID
14412/02/2019 15:001
23412/02/2019 18:341
22413/02/2019 14:022
33413/02/2019 20:342

Anyone that has any idea on how to tackle this?

Here you can find the testdata to lead into power bi: testdata 

Thank you in advance!

 

 

Kind regards,

Lien Brusselaers

 

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

@lienbrusselaers ,

 

If you need to create visual using field in two fact tables 'Fact Account State Transition' and 'Fact_Usage_Event', you need to build relationship between two tables. In the diagram you post, it seems one fact table can't be filtered by another fact table. In this senario, I would suggest you create relationship between 'Fact Account State Transition' and 'Fact_Usage_Event' based on columns(e.g.: UserID, DateID). However, this will cause circular error, so you need to remove "one side" relationships between the fact tables and dimensional tables.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That's not what I intend to do. There are a lot more tables in my original file so that's not really an option.

Also what I want to do is create segments in Fact_Account_State_Transition based on two columns (that are actually the other dimensions) and use these as a legend when displaying Fact_Usage_Event.

I'm afraid your solution won't help with that.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.