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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
srl01
Helper II
Helper II

Customer segmentation mix over time

I'm working with a sales transaction dataset with unique customer IDs for each customer, and want to graph customer segments overtime (defined various ways, but to start off I want to split into 2 segments - HighFrequencyCustomers, who have move than 6 transactions in the previous 12 months, and then all the rest).
 

TransactionsLast12Months = calculate(distinctcount(SalesRawData[TransactionCode]),filter(SalesRawData,SalesRawData[customerCode]<=max(SalesRawData[customerCode])),filter(all('Calendar'[Date]),'Calendar'[Date]>max('Calendar'[Date])-365 && 'Calendar'[Date]<=max('Calendar'[Date])))

IsHighFrequencyCustomer = [TransactionsLast12Months]>6



So far so good.
But how do I use the IsHighFrequencyCustomer as a filter or axis to be able to show the change over time in the mix between these two customer groups?
 
Would greatly appreciate guidance.
 

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee


@srl01 wrote:

I'm working with a sales transaction dataset with unique customer IDs for each customer, and want to graph customer segments overtime (defined various ways, but to start off I want to split into 2 segments - HighFrequencyCustomers, who have move than 6 transactions in the previous 12 months, and then all the rest).
 

TransactionsLast12Months = calculate(distinctcount(SalesRawData[TransactionCode]),filter(SalesRawData,SalesRawData[customerCode]<=max(SalesRawData[customerCode])),filter(all('Calendar'[Date]),'Calendar'[Date]>max('Calendar'[Date])-365 && 'Calendar'[Date]<=max('Calendar'[Date])))

IsHighFrequencyCustomer = [TransactionsLast12Months]>6



So far so good.
But how do I use the IsHighFrequencyCustomer as a filter or axis to be able to show the change over time in the mix between these two customer groups?
 
Would greatly appreciate guidance.
 


@srl01

It is not possible to put a measure to axis. To show the change over time, you can put calendar dates as X-axis and create two measures in a linechart. 

HighFrequencyCustomer = calculate( [some expression], FILTER('table',IsHighFrequencyCustomer))

NonHighFrequencyCustomer = calculate( [some expression], FILTER('table',NOT(IsHighFrequencyCustomer)))

Capture.PNG

View solution in original post

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee


@srl01 wrote:

I'm working with a sales transaction dataset with unique customer IDs for each customer, and want to graph customer segments overtime (defined various ways, but to start off I want to split into 2 segments - HighFrequencyCustomers, who have move than 6 transactions in the previous 12 months, and then all the rest).
 

TransactionsLast12Months = calculate(distinctcount(SalesRawData[TransactionCode]),filter(SalesRawData,SalesRawData[customerCode]<=max(SalesRawData[customerCode])),filter(all('Calendar'[Date]),'Calendar'[Date]>max('Calendar'[Date])-365 && 'Calendar'[Date]<=max('Calendar'[Date])))

IsHighFrequencyCustomer = [TransactionsLast12Months]>6



So far so good.
But how do I use the IsHighFrequencyCustomer as a filter or axis to be able to show the change over time in the mix between these two customer groups?
 
Would greatly appreciate guidance.
 


@srl01

It is not possible to put a measure to axis. To show the change over time, you can put calendar dates as X-axis and create two measures in a linechart. 

HighFrequencyCustomer = calculate( [some expression], FILTER('table',IsHighFrequencyCustomer))

NonHighFrequencyCustomer = calculate( [some expression], FILTER('table',NOT(IsHighFrequencyCustomer)))

Capture.PNG

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.