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
Milan14
Frequent Visitor

Customer Segmentation

Hi everyone,

 

I would like to calculate 

Q1. how many user been visit the store for {2-4 times, 5-7 times, 8 times and above};

Q2. how many user been spend for {RM100 and below, RM101-RM300, RM301 and above};

on the last 3 months, last 6 months and last 9 months.

 

Variable created:

Last 3 months: EOMONTH(TodayDate, -3)

Last 6 months: EOMONTH(TodayDate, -6)

Last 9 months: EOMONTH(TodayDate, -9)

 

Date Outcome:

Last 3 months: From 1 December, 2022 until yesterday

Last 6 months: From 1 September, 2022 until yesterday

Last 9 months: From 1 June, 2022 until yesterday

 

Sample Data:

Milan14_0-1678177799752.png

 

Expected Outcome:

Milan14_1-1678177821997.png

 

Does anyone have any ideas what kind of formula I should apply?

 

Any help would be much appreciated.

 

Thanks in advance!

 

Kindly Regards,

Milan

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

I hope the below can provide some ideas on how to create a solution for your datamodel.

All measures are in the attached pbix file.

 

Jihwan_Kim_1-1678180359106.png

 

 

Jihwan_Kim_0-1678180345804.png

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

2 REPLIES 2
Milan14
Frequent Visitor

Hi @Jihwan_Kim,

 

Thanks for your help, it's exactly what I need !

 

Regards,

Milan

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

I hope the below can provide some ideas on how to create a solution for your datamodel.

All measures are in the attached pbix file.

 

Jihwan_Kim_1-1678180359106.png

 

 

Jihwan_Kim_0-1678180345804.png

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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.